public final class EnumerationType extends AbstractNamedType
Constructor and Description |
---|
EnumerationType(java.lang.String moduleName,
java.lang.String name)
Constructs a public enumeration type with unspecified constants.
|
EnumerationType(java.lang.String moduleName,
java.lang.String name,
boolean isPrivate,
java.util.List<java.lang.String> constants)
Constructs a new enumeration type with a given module name, enumeration
name, and a list of enumeration constants.
|
EnumerationType(java.lang.String moduleName,
java.lang.String name,
boolean isPrivate,
java.util.List<java.lang.String> constants,
java.util.Map<java.lang.String,java.lang.String> metadata)
Constructs a new enumeration type with a given module name, enumeration
name, a list of enumeration constants and metadata.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends java.lang.Throwable> |
accept(TypeVisitor<T,E> visitor)
Accepts type visitor.
|
java.util.List<java.lang.String> |
getConstants()
Returns the enumeration constants.
|
java.lang.Class<?> |
getJavaClass()
Returns the Java class represented by this type.
|
Type |
getSupertype()
Returns a direct supertype to this type (or null for "Object" type).
|
boolean |
hasIntersectionType() |
equals, getData, getFullName, getMetadata, getMetadata, getModuleName, getName, hashCode, hasMetadata, isPrivate, setData, toString
assignableTo, findCommonSubtype, findCommonSupertype, getFreeTypes, hasFreeTypes, isCollection, matchesSubtype, matchesSupertype, performConversion, substituteFreeTypes
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
assignableTo, findCommonSubtype, findCommonSupertype, getFreeTypes, hasFreeTypes, isCollection, matchesSubtype, matchesSupertype, performConversion, substituteFreeTypes
public EnumerationType(java.lang.String moduleName, java.lang.String name)
moduleName
- name
- public EnumerationType(java.lang.String moduleName, java.lang.String name, boolean isPrivate, java.util.List<java.lang.String> constants)
moduleName
- a module namename
- an enumeration nameisPrivate
- true
if the type is privateconstants
- a list of enumeration constantspublic EnumerationType(java.lang.String moduleName, java.lang.String name, boolean isPrivate, java.util.List<java.lang.String> constants, java.util.Map<java.lang.String,java.lang.String> metadata)
moduleName
- a module namename
- an enumeration nameisPrivate
- true
if the type is privateconstants
- a list of enumeration constantsmetadata
- metadata, may be null
public java.util.List<java.lang.String> getConstants()
public Type getSupertype()
Type
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 java.lang.Class<?> getJavaClass()
Type
public boolean hasIntersectionType()
true
if the type contains an intersection typeCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.