public class TypeImpl extends Object implements Type, Comparable<TypeImpl>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TypeImpl t)
Note: you can only compare types from the same type system.
|
Vector<Feature> |
getAppropriateFeatures()
Deprecated.
|
int |
getCode()
Return the internal integer code for this type.
|
Type |
getComponentType()
For array types, returns the component type of the array type.
|
Feature |
getFeature(String featureName)
Deprecated.
|
Feature |
getFeatureByBaseName(String featureName)
Retrieve a feature for this type.
|
List<Feature> |
getFeatures()
guaranteed to be non-null, but might be empty list
|
String |
getName()
Get the name of the type.
|
int |
getNumberOfFeatures()
Get the number of features for which this type defines the range.
|
String |
getShortName()
Get the unqualified, short name of this type.
|
Type |
getSuperType()
Get the super type.
|
TypeSystem |
getTypeSystem()
Get the type hierarchy that this type belongs to.
|
boolean |
isAnnotationType()
Check if this is an annotation type.
|
boolean |
isArray()
Check if the type is an array type.
|
boolean |
isFeatureFinal()
Check if type is feature final, i.e., if no more new features may be defined for it.
|
boolean |
isInheritanceFinal()
Check if type is inheritance final, i.e., if new types can be derived from it.
|
boolean |
isPrimitive()
Check if the type is one of the primitive types.
|
String |
toString() |
public String getName()
public Type getSuperType()
@Deprecated public Vector<Feature> getAppropriateFeatures()
getAppropriateFeatures
in interface Type
public int getNumberOfFeatures()
getNumberOfFeatures
in interface Type
public boolean isAnnotationType()
true
, if this
is an annotation type; false
,
else.public TypeSystem getTypeSystem()
public int getCode()
>=0
.public int compareTo(TypeImpl t)
compareTo
in interface Comparable<TypeImpl>
public Feature getFeatureByBaseName(String featureName)
Type
getFeatureByBaseName
in interface Type
featureName
- The short, unqualified name of the feature.null
, else.Type.getFeatureByBaseName(String)
public String getShortName()
Type
getShortName
in interface Type
Type.getShortName()
public boolean isPrimitive()
Type
isPrimitive
in interface Type
true
iff type is a primitive type.Type.isPrimitive()
public boolean isFeatureFinal()
Type
isFeatureFinal
in interface Type
Type.isFeatureFinal()
public boolean isInheritanceFinal()
Type
isInheritanceFinal
in interface Type
Type.isInheritanceFinal()
@Deprecated public Feature getFeature(String featureName)
public List<Feature> getFeatures()
getFeatures
in interface Type
public boolean isArray()
Type
public Type getComponentType()
Type
null
.getComponentType
in interface Type
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.