Package org.apache.uima.jcas
Class JCasRegistry
- java.lang.Object
-
- org.apache.uima.jcas.JCasRegistry
-
public class JCasRegistry extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description JCasRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<? extends TOP>
getClassForIndex(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
getNumberOfRegisteredClasses()
Gets the number of cover classes that have been registered.static int
register(Class<? extends TOP> aJCasCoverClass)
Registers a JCas cover class with this registry.
-
-
-
Method Detail
-
register
public static int register(Class<? extends TOP> aJCasCoverClass)
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
public 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. 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
-
-