Package com.strobel.assembler.metadata
Class UnionType
- java.lang.Object
-
- com.strobel.assembler.metadata.MemberReference
-
- com.strobel.assembler.metadata.TypeReference
-
- com.strobel.assembler.metadata.UnionType
-
- All Implemented Interfaces:
IAnnotationsProvider
,IGenericContext
,IGenericParameterProvider
,IMetadataTypeMember
,IUnionType
public final class UnionType extends TypeReference implements IUnionType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.strobel.assembler.metadata.TypeReference
TypeReference.TypeFunctions
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TypeReference>
_alternatives
private java.lang.String
_simpleName
-
Fields inherited from class com.strobel.assembler.metadata.TypeReference
EMPTY_REFERENCES
-
-
Constructor Summary
Constructors Modifier Constructor Description private
UnionType(TypeReference... alternatives)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P>
Raccept(TypeMetadataVisitor<P,R> visitor, P parameter)
protected java.lang.StringBuilder
appendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
java.util.List<TypeReference>
getAlternatives()
java.lang.String
getSimpleName()
boolean
isUnionType()
static TypeReference
of(TypeReference... types)
-
Methods inherited from class com.strobel.assembler.metadata.TypeReference
appendBriefDescription, appendClassDescription, appendClassSignature, appendDescription, appendErasedClassSignature, appendErasedDescription, appendErasedSignature, appendGenericSignature, appendSignature, appendSimpleDescription, checkRecursive, containsGenericParameters, equals, findTypeVariable, getBriefDescription, getDeclaringType, getDescription, getElementType, getErasedDescription, getExtendsBound, getFullName, getGenericParameters, getInternalName, getName, getPackageName, getRawType, getSimpleDescription, getSimpleType, getSuperBound, getUnderlyingType, hasExtendsBound, hasGenericParameters, hashCode, hasSuperBound, isArray, isBoundedType, isCompoundType, isEquivalentTo, isGenericDefinition, isGenericParameter, isGenericType, isNested, isPrimitive, isUnbounded, isVoid, isWildcardType, makeArrayType, makeGenericType, makeGenericType, resolve, resolve, resolve, resolve, setDeclaringType, setName, toString
-
Methods inherited from class com.strobel.assembler.metadata.MemberReference
getAnnotations, getErasedSignature, getSignature, hasAnnotations, isDefinition, isSpecialName
-
-
-
-
Field Detail
-
_alternatives
private final java.util.List<TypeReference> _alternatives
-
_simpleName
private final java.lang.String _simpleName
-
-
Constructor Detail
-
UnionType
private UnionType(TypeReference... alternatives)
-
-
Method Detail
-
getAlternatives
public java.util.List<TypeReference> getAlternatives()
- Specified by:
getAlternatives
in interfaceIUnionType
-
getSimpleName
public java.lang.String getSimpleName()
- Specified by:
getSimpleName
in classTypeReference
-
appendName
protected java.lang.StringBuilder appendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
- Overrides:
appendName
in classTypeReference
-
accept
public <R,P> R accept(TypeMetadataVisitor<P,R> visitor, P parameter)
- Specified by:
accept
in classTypeReference
-
isUnionType
public boolean isUnionType()
- Overrides:
isUnionType
in classTypeReference
-
of
public static TypeReference of(TypeReference... types)
-
-