Package org.apache.uima.cas.impl
Class TypeImpl_array
- java.lang.Object
-
- org.apache.uima.cas.impl.TypeImpl
-
- org.apache.uima.cas.impl.TypeImpl_array
-
- All Implemented Interfaces:
java.lang.Comparable<TypeImpl>
,java.lang.Iterable<Feature>
,TypeSystemConstants
,Type
public class TypeImpl_array extends TypeImpl implements TypeSystemConstants
-
-
Field Summary
Fields Modifier and Type Field Description private SlotKinds.SlotKind
componentSlotKind
Component slot kindprivate TypeImpl
componentType
private FsGeneratorArray
generatorArray
private boolean
isHeapStoredArray
-
Fields inherited from class org.apache.uima.cas.impl.TypeImpl
hasRefFeature, highestOffset, isBuiltIn, isCreatableAndNotBuiltinArray, isFeatureFinal, isInheritanceFinal, isLongOrDouble, isRefType, javaClass, nbrOfLongOrDoubleFeatures, nbrOfUsedIntDataSlots, nbrOfUsedRefDataSlots, singleton, slotKind
-
Fields inherited from interface org.apache.uima.cas.impl.TypeSystemConstants
annotBaseSofaFeatAdjOffset, annotBaseSofaFeatCode, annotBaseTypeCode, annotTypeCode, arrayBaseTypeCode, beginFeatAdjOffset, beginFeatCode, booleanArrayTypeCode, booleanTypeCode, byteArrayTypeCode, byteTypeCode, docTypeCode, doubleArrayTypeCode, doubleTypeCode, endFeatAdjOffset, endFeatCode, floatArrayTypeCode, floatEListTypeCode, floatListTypeCode, floatNeListTypeCode, floatTypeCode, fsArrayTypeCode, fsEListTypeCode, fsListTypeCode, fsNeListTypeCode, intArrayTypeCode, intEListTypeCode, intListTypeCode, intNeListTypeCode, intTypeCode, langFeatAdjOffset, langFeatCode, longArrayTypeCode, longTypeCode, shortArrayTypeCode, shortTypeCode, sofaArrayFeatAdjOffset, sofaArrayFeatCode, sofaIdFeatAdjOffset, sofaIdFeatCode, sofaMimeFeatAdjOffset, sofaMimeFeatCode, sofaNumFeatAdjOffset, sofaNumFeatCode, sofaStringFeatAdjOffset, sofaStringFeatCode, sofaTypeCode, sofaUriFeatAdjOffset, sofaUriFeatCode, stringArrayTypeCode, stringEListTypeCode, stringListTypeCode, stringNeListTypeCode, stringTypeCode, topTypeCode
-
-
Constructor Summary
Constructors Constructor Description TypeImpl_array(java.lang.String name, TypeImpl componentType, TypeSystemImpl tsi, TypeImpl supertype, SlotKinds.SlotKind componentSlotKind, boolean isHeapStoredArray, java.lang.Class<?> javaClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) TypeImpl
consolidateType(TypeImpl topType, TypeImpl fsArrayType)
Consolidate arrays of fsRefs to fsArrayType and ordinary fsRefs to TOP for generic getters and settersSlotKinds.SlotKind
getComponentSlotKind()
Component Slot KindTypeImpl
getComponentType()
For array types, returns the component type of the array type.(package private) FsGeneratorArray
getGeneratorArray()
boolean
isArray()
Check if the type is an array type.(package private) boolean
isAuxStoredArray()
model how v2 stores this - needed for backward compatibility / (de)serialization(package private) boolean
isHeapStoredArray()
model how v2 stores this - needed for backward compatibility / (de)serializationboolean
isTypedFsArray()
(package private) void
setGeneratorArray(FsGeneratorArray generatorArray)
boolean
subsumes(TypeImpl subType)
-
Methods inherited from class org.apache.uima.cas.impl.TypeImpl
addFeature, checkExistingFeatureCompatible, compareTo, computeDepthFirstCode, equals, getAdjOffset, getAllSubtypes, getAllSuperTypes, getAppropriateFeatures, getCode, getDirectSubtypes, getFeature, getFeatureByAdjOffset, getFeatureByBaseName, getFeatureImpls, getFeatures, getFeaturesAsStream, getFsSpaceReq, getFsSpaceReq, getFsSpaceReq, getJavaClass, getJCasClassName, getMergedStaticFeaturesIntroducedByThisType, getName, getNbrOfLongOrDoubleFeatures, getNumberOfFeatures, getShortName, getStaticMergedNonSofaFsRefs, getSuperType, getTypeSystem, hashCode, hashCodeNameLong, hasRefFeature, hasSupertype, initAdjOffset2FeatureMaps, isAnnotationBaseType, isAnnotationType, isAppropriateFeature, isCreatableAndNotBuiltinArray, isFeatureFinal, isInheritanceFinal, isLongOrDouble, isPrimitive, isPrimitiveArrayType, isStringOrStringSubtype, isStringSubtype, isTopType, iterator, prettyPrint, prettyPrintWithSubTypes, setBuiltIn, setFeatureFinal, setInheritanceFinal, setJavaClass, setStaticMergedIntFeaturesList, setStaticMergedNonSofaFsRefs, setStaticMergedRefFeaturesList, subsumesStrictly, subsumesValue, toString, toString
-
-
-
-
Field Detail
-
componentType
private final TypeImpl componentType
-
isHeapStoredArray
private final boolean isHeapStoredArray
-
componentSlotKind
private final SlotKinds.SlotKind componentSlotKind
Component slot kind
-
generatorArray
private FsGeneratorArray generatorArray
-
-
Constructor Detail
-
TypeImpl_array
public TypeImpl_array(java.lang.String name, TypeImpl componentType, TypeSystemImpl tsi, TypeImpl supertype, SlotKinds.SlotKind componentSlotKind, boolean isHeapStoredArray, java.lang.Class<?> javaClass)
-
-
Method Detail
-
getComponentType
public TypeImpl getComponentType()
Description copied from interface:Type
For array types, returns the component type of the array type. For all other types, it will returnnull
.- Specified by:
getComponentType
in interfaceType
- Overrides:
getComponentType
in classTypeImpl
- Returns:
- The component type of an array type.
-
consolidateType
TypeImpl consolidateType(TypeImpl topType, TypeImpl fsArrayType)
Description copied from class:TypeImpl
Consolidate arrays of fsRefs to fsArrayType and ordinary fsRefs to TOP for generic getters and setters- Overrides:
consolidateType
in classTypeImpl
- Parameters:
topType
- -fsArrayType
- -- Returns:
- this type or one of the two passed in types
-
isArray
public boolean isArray()
Description copied from interface:Type
Check if the type is an array type.- Specified by:
isArray
in interfaceType
- Overrides:
isArray
in classTypeImpl
- Returns:
true
iff the type is an array type.- See Also:
Type.isArray()
-
isHeapStoredArray
boolean isHeapStoredArray()
Description copied from class:TypeImpl
model how v2 stores this - needed for backward compatibility / (de)serialization- Overrides:
isHeapStoredArray
in classTypeImpl
- Returns:
- true if it is an array and is stored in the main heap (int, float, or string)
-
isAuxStoredArray
boolean isAuxStoredArray()
Description copied from class:TypeImpl
model how v2 stores this - needed for backward compatibility / (de)serialization- Overrides:
isAuxStoredArray
in classTypeImpl
- Returns:
- true if it is an array and is one of the 3 aux arrays (byte (also used for boolean) short, long
-
getComponentSlotKind
public SlotKinds.SlotKind getComponentSlotKind()
Component Slot Kind- Overrides:
getComponentSlotKind
in classTypeImpl
-
subsumes
public boolean subsumes(TypeImpl subType)
-
isTypedFsArray
public boolean isTypedFsArray()
- Overrides:
isTypedFsArray
in classTypeImpl
- Returns:
- true if this array type is a subtype of FSArray over a specific feature structure (other than TOP, or one of the primitives)
-
getGeneratorArray
FsGeneratorArray getGeneratorArray()
- Returns:
- the generatorArray
-
setGeneratorArray
void setGeneratorArray(FsGeneratorArray generatorArray)
- Parameters:
generatorArray
- the generatorArray to set
-
-