Package org.apache.uima.cas.impl
Class TypeImpl
java.lang.Object
org.apache.uima.cas.impl.TypeImpl
- All Implemented Interfaces:
Comparable<TypeImpl>,Type
- Direct Known Subclasses:
StringTypeImpl
The implementation of types in the type system.
- Version:
- $Revision: 1.3 $
-
Method Summary
Modifier and TypeMethodDescriptionintNote: you can only compare types from the same type system.Deprecated.intgetCode()Return the internal integer code for this type.For array types, returns the component type of the array type.getFeature(String featureName) Deprecated.getFeatureByBaseName(String featureName) Retrieve a feature for this type.guaranteed to be non-null, but might be empty listgetName()Get the name of the type.intGet the number of features for which this type defines the range.Get the unqualified, short name of this type.Get the super type.Get the type hierarchy that this type belongs to.booleanCheck if this is an annotation type.booleanisArray()Check if the type is an array type.booleanCheck if type is feature final, i.e., if no more new features may be defined for it.booleanCheck if type is inheritance final, i.e., if new types can be derived from it.booleanCheck if the type is one of the primitive types.toString()
-
Method Details
-
getName
Get the name of the type. -
getSuperType
Get the super type.- Returns:
- The super type or null for Top.
-
toString
-
getAppropriateFeatures
Deprecated.Get a vector of the features for which this type is the domain. Features will be returned in no particular order.- Specified by:
getAppropriateFeaturesin interfaceType- Returns:
- The vector.
-
getNumberOfFeatures
public int getNumberOfFeatures()Get the number of features for which this type defines the range.- Specified by:
getNumberOfFeaturesin interfaceType- Returns:
- The number of features.
-
isAnnotationType
public boolean isAnnotationType()Check if this is an annotation type.- Returns:
true, ifthisis an annotation type;false, else.
-
getTypeSystem
Get the type hierarchy that this type belongs to.- Returns:
- The type hierarchy.
-
getCode
public int getCode()Return the internal integer code for this type. This is only useful if you want to work with the low-level API.- Returns:
- The internal code for this type,
>=0.
-
compareTo
Note: you can only compare types from the same type system. If you compare types from different type systems, the result is undefined.- Specified by:
compareToin interfaceComparable<TypeImpl>
-
getFeatureByBaseName
Description copied from interface:TypeRetrieve a feature for this type. Inherited features can also be retrieved this way.- Specified by:
getFeatureByBaseNamein interfaceType- Parameters:
featureName- The short, unqualified name of the feature.- Returns:
- The feature, if it exists;
null, else. - See Also:
-
getShortName
Description copied from interface:TypeGet the unqualified, short name of this type.- Specified by:
getShortNamein interfaceType- Returns:
- The short name of this type.
- See Also:
-
isPrimitive
public boolean isPrimitive()Description copied from interface:TypeCheck if the type is one of the primitive types.- Specified by:
isPrimitivein interfaceType- Returns:
trueiff type is a primitive type.- See Also:
-
isFeatureFinal
public boolean isFeatureFinal()Description copied from interface:TypeCheck if type is feature final, i.e., if no more new features may be defined for it.- Specified by:
isFeatureFinalin interfaceType- Returns:
- If type is feature final.
- See Also:
-
isInheritanceFinal
public boolean isInheritanceFinal()Description copied from interface:TypeCheck if type is inheritance final, i.e., if new types can be derived from it.- Specified by:
isInheritanceFinalin interfaceType- Returns:
- If type is inheritance final.
- See Also:
-
getFeature
Deprecated.- Parameters:
featureName- -- Returns:
- -
-
getFeatures
guaranteed to be non-null, but might be empty list- Specified by:
getFeaturesin interfaceType- Returns:
- -
-
isArray
public boolean isArray()Description copied from interface:TypeCheck if the type is an array type. -
getComponentType
Description copied from interface:TypeFor array types, returns the component type of the array type. For all other types, it will returnnull.- Specified by:
getComponentTypein interfaceType- Returns:
- The component type of an array type.
-