public final class IntersectionType extends ClassType
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SEPARATOR
A separator string.
|
Constructor and Description |
---|
IntersectionType(RecordType superType,
java.util.Collection<InterfaceType> interfaces)
Creates a new intersection type.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends java.lang.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(java.lang.Object obj) |
int |
hashCode() |
boolean |
hasIntersectionType() |
boolean |
isAbstract()
Returns
true if the type is abstract. |
java.lang.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 java.lang.String SEPARATOR
public IntersectionType(RecordType superType, java.util.Collection<InterfaceType> interfaces)
superType
- interfaces
- public java.lang.String toString()
toString
in class java.lang.Object
public <T,E extends java.lang.Throwable> T accept(TypeVisitor<T,E> visitor) throws E extends java.lang.Throwable
Type
T
- visitor return typevisitor
- visitor to visitE
E extends java.lang.Throwable
public boolean isAbstract()
ClassType
true
if the type is abstract.isAbstract
in class ClassType
true
if the type is abstractpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public 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.