CodeQL library for Go
codeql/go-all 2.1.3 (changelog, source)
Search

Class EmptyInterfaceType

An empty interface type.

Note that by we have to be careful to exclude the underlying type of comparable. This is done by extending BasicInterfaceType.

Import path

import semmle.go.Types

Direct supertypes

Indirect supertypes

Inherited predicates

getADirectlyEmbeddedInterface

Gets a type whose underlying type is an interface that is directly embedded into this interface.

from InterfaceType
getAnEmbeddedInterface

Gets a type whose underlying type is an interface that is embedded into this interface.

from InterfaceType
getAnEmbeddedTypeSetLiteral

Gets a type set literal of this interface type.

from InterfaceType
getDirectlyEmbeddedTypeSetLiteral

Gets the type set literal with index index from the definition of this interface type.

from InterfaceType
getEntity

Gets the entity associated with this type.

from Type
getField

Gets the field f of this type.

from Type
getMethod

Gets the method m belonging to the method set of this type, if any.

from Type
getMethodType

Gets the type of method name of this interface type.

from InterfaceType
getName

Gets the name of this type, if it has one.

from Type
getPackage

Gets the package in which this type is declared, if any.

from Type
getPointerType

Gets the pointer type that has this type as its base type.

from Type
getQualifiedName

Gets the qualified name of this type, if any.

from Type
getUnderlyingType

Gets the underlying type of this type after any type aliases have been replaced with their definition.

from Type
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

from Type
hasMethod

Holds if the method set of this type contains a method named m of type t.

from InterfaceType
hasPrivateMethodWithQualifiedName

Holds if this interface type has a private method name, with qualified name qname and type type.

from InterfaceType
hasQualifiedName

Holds if this type is declared in a package with path pkg and has name name.

from Type
implements

Holds if this type implements interface i, that is, the method set of i is contained in the method set of this type and any type restrictions are satisfied.

from Type
implements

Holds if this type implements an interface that has the qualified name pkg.name, that is, the method set of pkg.name is contained in the method set of this type and any type restrictions are satisfied.

from Type
implementsComparable

Holds if this type implements comparable. This includes being comparable itself, or the underlying type of comparable.

from Type
isOrEmbedsComparable

Holds if this interface type is (the underlying type of) comparable, or it embeds comparable.

from InterfaceType
pp

Gets a pretty-printed representation of this type, including its structure where applicable.

from InterfaceType
toString

Gets a basic textual representation of this type.

from BasicInterfaceType

Charpred