Package org.apache.uima.jcas
Class JCasRegistry
java.lang.Object
org.apache.uima.jcas.JCasRegistry
Maintains a registry of JCas cover classes that have been loaded. Methods on this
class are called from JCas cover classes (that is, classes generated by JCasGen).
They are not intended to be called directly from user-written code.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClassForIndex
(int aIndex) Gets the JCas cover class for a given index.static boolean
getFeatOkTst
(String fullyQualTypeName) For a particular type, return true if that type should have run-time checking for use of fields defined in the JCas Model which are not present in the CAS.static int
Gets the number of cover classes that have been registered.static int
Registers a JCas cover class with this registry.
-
Field Details
-
loadedJCasClasses
-
-
Constructor Details
-
JCasRegistry
public JCasRegistry()
-
-
Method Details
-
register
Registers a JCas cover class with this registry. The registry will assign it a unique index, which is then used by the cover-class to identify itself to the JCas implementation.- Parameters:
aJCasCoverClass
- the class to register- Returns:
- the unique index value for this class.
-
getFeatOkTst
For a particular type, return true if that type should have run-time checking for use of fields defined in the JCas Model which are not present in the CAS. If false, all fields in the JCas must be in the CAS type system at instantiation time, or an exception is thrown; this allows the runtime to skip this test.This is reserved for future use; it currently always returns true.
- Parameters:
fullyQualTypeName
- fully qualified type name- Returns:
- true if that type should have run-time checking for use of fields defined in the JCas Model which are not present in the CAS. If false, all fields in the JCas must be in the CAS type system at instantiation time, or an exception is thrown; this allows the runtime to skip this test.
-
getNumberOfRegisteredClasses
public static int getNumberOfRegisteredClasses()Gets the number of cover classes that have been registered.- Returns:
- the number of registered JCas cover classes
-
getClassForIndex
Gets the JCas cover class for a given index.- Parameters:
aIndex
- the index- Returns:
- the JCas cover class that was assigned the value
aIndex
during its registration,null
if none.
-