public final class IntersectionType extends ClassType
Modifier and Type | Field and Description |
---|---|
static String |
SEPARATOR
A separator string.
|
Constructor and Description |
---|
IntersectionType(RecordType superType,
Collection<InterfaceType> interfaces)
Creates a new intersection type.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
accept(TypeVisitor<T,E> visitor)
Accepts type visitor.
|
boolean |
assignableTo(Type target)
Returns information whether a value of this type can be assigned to a
variable of another type.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
hasIntersectionType() |
boolean |
isAbstract()
Returns
true if the type is abstract. |
String |
toString() |
findCommonSubtype, findCommonSupertype, getAllInterfaces, getInterfaces, getJavaClass, getLocalMethods, getLocalStaticMethods, getMethodBySignature, getMethods, getMethodsForName, getMethodsForName, getOverriddenMethodsBySignature, getRecordSupertype, getStaticMethods, getStaticMethodsForName, getSupertype, isCompiled
getFreeTypes, hasFreeTypes, isCollection, matchesSubtype, matchesSupertype, performConversion, substituteFreeTypes
public static final String SEPARATOR
public IntersectionType(RecordType superType, Collection<InterfaceType> interfaces)
superType
- interfaces
- public <T,E extends Throwable> T accept(TypeVisitor<T,E> visitor) throws E extends Throwable
Type
T
- visitor return typevisitor
- visitor to visitE
E extends Throwable
public boolean isAbstract()
ClassType
true
if the type is abstract.isAbstract
in class ClassType
true
if the type is abstractpublic boolean assignableTo(Type target)
Type
assignableTo
in interface Type
assignableTo
in class ClassType
target
- type of the target variablepublic boolean hasIntersectionType()
true
if the type contains an intersection typeCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.