public static class Type.UnionClassType extends Type.ClassType implements UnionType
Type.AnnotatedType, Type.ArrayType, Type.CapturedType, Type.CapturedUndetVar, Type.ClassType, Type.DelegatedType, Type.ErasedClassType, Type.ErrorType, Type.ForAll, Type.IntersectionClassType, Type.JCNoType, Type.JCPrimitiveType, Type.JCVoidType, Type.Mapping, Type.MethodType, Type.PackageType, Type.TypeVar, Type.UndetVar, Type.UnionClassType, Type.UnknownType, Type.Visitor<R,S>, Type.WildcardType
all_interfaces_field, allparams_field, interfaces_field, supertype_field, typarams_field
Constructor and Description |
---|
UnionClassType(Type.ClassType ct,
List<? extends Type> alternatives) |
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(TypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
List<? extends TypeMirror> |
getAlternatives()
Return the alternatives comprising this union type.
|
TypeKind |
getKind()
Returns the
kind of this type. |
Type |
getLub() |
accept, allparams, complete, constType, contains, getEnclosingType, getTag, getTypeArguments, hasErasedSupertypes, isErroneous, isNullOrReference, isParameterized, isRaw, isReference, map, setEnclosingType, toString
annotatedType, argtypes, asElement, asMethodType, baseType, baseTypes, constValue, contains, containsAny, containsAny, equals, filter, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getLowerBound, getModelType, getModelTypes, getOriginalType, getParameterTypes, getReceiverType, getReturnType, getThrownTypes, getUpperBound, hashCode, hasTag, isAnnotated, isCompound, isErroneous, isExtendsBound, isFalse, isFinal, isInterface, isNumeric, isPartial, isPrimitive, isPrimitiveOrVoid, isSuperBound, isTrue, isUnbound, map, stringValue, toString, unannotatedType, withTypeVar
getAttribute, getInheritedAnnotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, hashCode, toString
getAnnotation, getAnnotationMirrors, getAnnotationsByType
asElement
public UnionClassType(Type.ClassType ct, List<? extends Type> alternatives)
public Type getLub()
public List<? extends TypeMirror> getAlternatives()
UnionType
getAlternatives
in interface UnionType
public TypeKind getKind()
TypeMirror
kind
of this type.getKind
in interface TypeMirror
getKind
in class Type.ClassType
public <R,P> R accept(TypeVisitor<R,P> v, P p)
TypeMirror
accept
in interface TypeMirror
accept
in class Type.ClassType
R
- the return type of the visitor's methodsP
- the type of the additional parameter to the visitor's methodsv
- the visitor operating on this typep
- additional parameter to the visitorCopyright © 2015. All rights reserved.