Class Model

java.lang.Object
com.sun.tools.xjc.model.Model
All Implemented Interfaces:
CCustomizable, TypeInfoSet<NType,NClass,Void,Void>

public final class Model extends Object implements TypeInfoSet<NType,NClass,Void,Void>, CCustomizable
Root of the object model that represents the code that needs to be generated.

A Model is a schema language neutral representation of the result of a schema parsing. The back-end then works against this model to turn this into a series of Java source code.

Author:
Kohsuke Kawaguchi
  • Field Details

    • schemaComponent

      public final XSSchemaSet schemaComponent
      If this model was built from XML Schema, this field stores the root object of the parse schema model. Otherwise null.
      Since:
      2.1.1
    • codeModel

      public final JCodeModel codeModel
      This model uses this code model exclusively.
    • options

      public final Options options
      Command-line options used for building this model.
    • serializable

      public boolean serializable
      True to generate serializable classes.
    • serialVersionUID

      public Long serialVersionUID
      serial version UID to be generated. null if not to generate serialVersionUID field.
    • rootClass

      public JClass rootClass
      If non-null, all the generated classes should eventually derive from this class.
    • rootInterface

      public JClass rootInterface
      If non-null, all the generated interfaces should eventually derive from this interface.
    • strategy

      public ImplStructureStrategy strategy
      Specifies the code generation strategy. Must not be null.
    • defaultSymbolSpace

      public final SymbolSpace defaultSymbolSpace
      Default ID/IDREF symbol space. Any ID/IDREF without explicit reference to a symbol space is assumed to use this default symbol space.
  • Constructor Details

    • Model

      public Model(Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent)
      Parameters:
      nc - Usually this should be set in the constructor, but we do allow this parameter to be initially null, and then set later.
      schemaComponent - The source schema model, if this is built from XSD.
  • Method Details