| java.lang.Object com.sun.tools.xjc.model.Model
Model | final public class Model implements TypeInfoSet<NType, NClass, Void, Void>,CCustomizable(Code) | | 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 scehma parsing. The back-end then works against this model
to turn this into a series of Java source code.
author: Kohsuke Kawaguchi |
Method Summary | |
void | add(CEnumLeafInfo e) | void | add(CClassInfo ci) | void | add(CElementInfo ei) | public Map<NType, ? extends CArrayInfo> | arrays() No array mapping generation for XJC. | public Map<NClass, CClassInfo> | beans() | public Map<NType, ? extends CBuiltinLeafInfo> | builtins() | final public Map<QName, CClassInfo> | createTopLevelBindings() Represents the "top-level binding". | public void | dump(Result out) | public Map<NClass, CEnumLeafInfo> | enums() | public Outline | generateCode(Options opt, ErrorReceiver receiver) Fully-generate the source code into the given model.
null if there was any errors. | public Iterable<? extends CElementInfo> | getAllElements() | public CBuiltinLeafInfo | getAnyTypeInfo() | public XmlNsForm | getAttributeFormDefault(String nsUri) | public CClassInfo | getClassInfo(NClass t) | public CCustomizations | getCustomizations() Gets the global customizations. | public XmlNsForm | getElementFormDefault(String nsUri) | public CElementInfo | getElementInfo(NClass scope, QName name) | public Map<QName, CElementInfo> | getElementMappings(NClass scope) | public Locator | getLocator() | final public NameConverter | getNameConverter() Gets the name converter that shall be used to parse XML names into Java names. | public Navigator<NType, NClass, Void, Void> | getNavigator() | public CClassInfoParent.Package | getPackage(JPackage pkg) | public XSComponent | getSchemaComponent() | public Map<String, String> | getSchemaLocations() | public SymbolSpace | getSymbolSpace(String name) | public CNonElement | getTypeInfo(NType type) | public CNonElement | getTypeInfo(Ref<NType, NClass> ref) | public Map<String, String> | getXmlNs(String namespaceUri) Not implemented in the compile-time model. | public boolean | isPackageLevelAnnotations() | public void | setNameConverter(NameConverter nameConverter) | public void | setPackageLevelAnnotations(boolean packageLevelAnnotations) | public Map<QName, TypeUse> | typeUses() |
allocator | final ClassNameAllocatorWrapper allocator(Code) | | This allocator has the final say on deciding the class name.
Must not be null.
Model classes are responsible for using the allocator.
This allocator interaction should be transparent to the user/builder
of the model.
|
codeModel | final public JCodeModel codeModel(Code) | | This model uses this code model exclusively.
|
defaultSymbolSpace | final public SymbolSpace defaultSymbolSpace(Code) | | Default ID/IDREF symbol space. Any ID/IDREF without explicit
reference to a symbol space is assumed to use this default
symbol space.
|
options | final public Options options(Code) | | Command-line options used for building this model.
|
rootClass | public JClass rootClass(Code) | | If non-null, all the generated classes should eventually derive from this class.
|
rootInterface | public JClass rootInterface(Code) | | If non-null, all the generated interfaces should eventually derive from this interface.
|
schemaComponent | final public XSSchemaSet schemaComponent(Code) | | If this model was built from XML Schema, this field
stores the root object of the parse schema model.
Otherwise null.
|
serialVersionUID | public Long serialVersionUID(Code) | | serial version UID to be generated.
null if not to generate serialVersionUID field.
|
serializable | public boolean serializable(Code) | | True to generate serializable classes.
|
Model | public Model(Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent)(Code) | | Parameters: nc - Usually this should be set in the constructor, but we do allow this parameterto be initially null, and then set later. Parameters: schemaComponent - The source schema model, if this is built from XSD. |
createTopLevelBindings | final public Map<QName, CClassInfo> createTopLevelBindings()(Code) | | Represents the "top-level binding".
This is used to support the use of a schema inside WSDL.
For XML Schema, the top-level binding is a map from
global element declarations to its representation class.
For other schema languages, it should follow the appendicies in
WSDL (but in practice no one would use WSDL with a schema language
other than XML Schema, so it doesn't really matter.)
This needs to be filled by the front-end.
|
generateCode | public Outline generateCode(Options opt, ErrorReceiver receiver)(Code) | | Fully-generate the source code into the given model.
null if there was any errors. Otherwise it returns a validOutline object, which captures how the model objectsare mapped to the generated source code. Add-ons can use those information to further augment the generatedsource code. |
getNameConverter | final public NameConverter getNameConverter()(Code) | | Gets the name converter that shall be used to parse XML names into Java names.
|
isPackageLevelAnnotations | public boolean isPackageLevelAnnotations()(Code) | | |
setNameConverter | public void setNameConverter(NameConverter nameConverter)(Code) | | |
setPackageLevelAnnotations | public void setPackageLevelAnnotations(boolean packageLevelAnnotations)(Code) | | |
|
|