public abstract class ClassType extends AbstractType
Modifier and Type | Method and Description |
---|---|
boolean |
assignableTo(Type target)
Returns information whether a value of this type can be assigned to a
variable of another type.
|
Type |
findCommonSubtype(Type other)
Returns the common subtype, i.e.
|
Type |
findCommonSupertype(Type other)
Returns the common supertype, i.e.
|
Set<InterfaceType> |
getAllInterfaces()
Returns the set of all interfaces that this interface extends.
|
Set<InterfaceType> |
getInterfaces()
Returns the set of interfaces extending directly.
|
Class<?> |
getJavaClass()
Returns the Java class represented by this type.
|
Collection<FunctionSignature> |
getLocalMethods()
Returns locally defined methods (methods defined in this type, not inherited).
|
Collection<FunctionSignature> |
getLocalStaticMethods()
Returns locally defined static methods (methods defined in this type, not inherited).
|
FunctionSignature |
getMethodBySignature(String signatureString)
Returns a method by a given signature string.
|
Collection<FunctionSignature> |
getMethods()
Returns all methods (including inherited).
|
Collection<FunctionSignature> |
getMethodsForName(String name,
Type[] paramTypes,
Visibility visibility)
Returns a collection of methods with the given name and parameter types.
|
Collection<FunctionSignature> |
getMethodsForName(String name,
Visibility visibility)
Returns collection of methods with a given name.
|
Collection<FunctionSignature> |
getOverriddenMethodsBySignature(String signatureString)
Returns a collection of overridden methods by a given signature.
|
RecordType |
getRecordSupertype()
Returns the record super type, or
null it this type
does not extend another record type. |
Collection<FunctionSignature> |
getStaticMethods()
Returns all static methods (including inherited).
|
Collection<FunctionSignature> |
getStaticMethodsForName(String name,
Visibility visibility)
Returns collection of static methods with a given name.
|
Type |
getSupertype()
Returns a direct supertype to this type (or null for "Object" type).
|
abstract boolean |
isAbstract()
Returns
true if the type is abstract. |
boolean |
isCompiled()
Indicates whether this type is compiled
|
getFreeTypes, hasFreeTypes, isCollection, matchesSubtype, matchesSupertype, performConversion, substituteFreeTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, hasIntersectionType
public final RecordType getRecordSupertype()
null
it this type
does not extend another record type.null
public Type getSupertype()
Type
public Class<?> getJavaClass()
Type
public Set<InterfaceType> getInterfaces()
public Set<InterfaceType> getAllInterfaces()
public boolean assignableTo(Type target)
Type
assignableTo
in interface Type
assignableTo
in class AbstractType
target
- type of the target variablepublic Type findCommonSupertype(Type other)
Type
other
.findCommonSupertype
in interface Type
findCommonSupertype
in class AbstractType
public Type findCommonSubtype(Type other)
Type
other
.findCommonSubtype
in interface Type
findCommonSubtype
in class AbstractType
public abstract boolean isAbstract()
true
if the type is abstract.true
if the type is abstractpublic Collection<FunctionSignature> getLocalMethods()
public Collection<FunctionSignature> getMethods()
public Collection<FunctionSignature> getStaticMethods()
public Collection<FunctionSignature> getLocalStaticMethods()
public Collection<FunctionSignature> getMethodsForName(String name, Visibility visibility)
name
- visibility
- public Collection<FunctionSignature> getMethodsForName(String name, Type[] paramTypes, Visibility visibility)
name
- the name of the methodparamTypes
- the type of parametersvisibility
- public Collection<FunctionSignature> getStaticMethodsForName(String name, Visibility visibility)
name
- visibility
- public FunctionSignature getMethodBySignature(String signatureString)
null
.signatureString
- null
public boolean isCompiled()
true
if this type is compiledpublic Collection<FunctionSignature> getOverriddenMethodsBySignature(String signatureString)
signatureString
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.