change DocumentAnnotation JCas class to new lazy style
package org.apache.uima.jcas.tcas;
+import java.lang.invoke.CallSite;
+import java.lang.invoke.MethodHandle;
+
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.TypeImpl;
@@ -47,7 +50,8 @@ public class DocumentAnnotation extends Annotation {
return typeIndexID;
}
- public final static int _FI_language = TypeSystemImpl.getAdjustedFeatureOffset("language");
+ private final static CallSite _FC_language = TypeSystemImpl.createCallSite(DocumentAnnotation.class, "language");
+ private final static MethodHandle _FH_language = _FC_language.dynamicInvoker();
// Never called. Disable default constructor
protected DocumentAnnotation() {
@@ -74,13 +78,13 @@ public class DocumentAnnotation extends Annotation {
* getter for language
* @return the language
*/
- public String getLanguage() { return _getStringValueNc(_FI_language); }
+ public String getLanguage() { return _getStringValueNc(wrapGetIntCatchException(_FH_language)); }
/**
* setter for language
* @param v the language
*/
public void setLanguage(String v) {
- _setStringValueNfc(_FI_language, v);
+ _setStringValueNfc(wrapGetIntCatchException(_FH_language), v);
}
}
