Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • supports lazy loading trivially, but not lazy generation
  • restricts particular UIMA app to one type system.

Content of generated class

The content has information enabling backwards compatibility (mainly, the _Type class and its support of the Low-Level APIs).  The main class also has generated content for backwards compatibility.

Main class:  There's one instance of this 

  • extends = the super class from the UIMA type system.
  • backwards compatibility:
    • a global index into the JCasRegistry for this class (need to watch out for memory leaks)
    • an int that represents the "id".  This is an incrementing by one value per CAS (not by cas view)
    • more - tbd
  • for each defined feature:
    • a private field, with a name starting with _ and corresponding to the feature name.  (Note that feature names cannot start with _)
    • getters and setters for the field, with specific typing info.  
      • Also, a version of these for arrays, to allow element access
      • These directly access the fields.
  • constructors (used by new operator), taking a JCas as an argument, for backwards compatibility
    • For subtypes of Annotation, a 3 arg constructor specifying begin and end (backwards compat).
  • (Cannot have a static ref to the TypeImpl because for built-ins, there's one class shared by multiple type systems)
  • A reference to the shared (per view) instance of the corresponding _Type class
    • From here, the TypeImpl can be located, as well as the CAS view
    • This instance is created on demand, if needed- from a map (identityHash) <class of instance -> instance of _Type) in the CAS view.

_Type class:  There's one instance of this per CAS view (per JCas class).

  • extends = the super _Type class corresponding to the super type in the UIMA type system
  • backwards compatibility:
    • generated low-level APIs for setting and getting values as is now done
    • The same global index into JCasRegistry from the main class, via static reference to corresponding field
    • has the same control flags as v2
  • ref to CAS/JCas view
  • ref to TypeImpl

Generation notes

Need to package ASM embedded within new prefix in project (ASM requirement?)

...