|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.tools.xjc.model.Model
public final class Model
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.
| Field Summary | |
|---|---|
JCodeModel |
codeModel
This model uses this code model exclusively. |
SymbolSpace |
defaultSymbolSpace
Default ID/IDREF symbol space. |
Options |
options
Command-line options used for building this model. |
JClass |
rootClass
If non-null, all the generated classes should eventually derive from this class. |
JClass |
rootInterface
If non-null, all the generated interfaces should eventually derive from this interface. |
XSSchemaSet |
schemaComponent
If this model was built from XML Schema, this field stores the root object of the parse schema model. |
boolean |
serializable
True to generate serializable classes. |
Long |
serialVersionUID
serial version UID to be generated. |
ImplStructureStrategy |
strategy
Specifies the code generation strategy. |
| Constructor Summary | |
|---|---|
Model(Options opts,
JCodeModel cm,
com.sun.xml.bind.api.impl.NameConverter nc,
ClassNameAllocator allocator,
XSSchemaSet schemaComponent)
|
|
| Method Summary | |
|---|---|
Map<NType,? extends CArrayInfo> |
arrays()
No array mapping generation for XJC. |
Map<NClass,CClassInfo> |
beans()
|
Map<NType,? extends CBuiltinLeafInfo> |
builtins()
|
Map<QName,CClassInfo> |
createTopLevelBindings()
Represents the "top-level binding". |
void |
dump(Result out)
|
Map<NClass,CEnumLeafInfo> |
enums()
|
Outline |
generateCode(Options opt,
ErrorReceiver receiver)
Fully-generate the source code into the given model. |
Iterable<? extends CElementInfo> |
getAllElements()
|
CBuiltinLeafInfo |
getAnyTypeInfo()
|
XmlNsForm |
getAttributeFormDefault(String nsUri)
|
CClassInfo |
getClassInfo(NClass t)
|
CCustomizations |
getCustomizations()
Gets the global customizations. |
XmlNsForm |
getElementFormDefault(String nsUri)
|
CElementInfo |
getElementInfo(NClass scope,
QName name)
|
Map<QName,CElementInfo> |
getElementMappings(NClass scope)
|
Locator |
getLocator()
Deprecated. No line number available for the "root" component. |
com.sun.xml.bind.api.impl.NameConverter |
getNameConverter()
Gets the name converter that shall be used to parse XML names into Java names. |
com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,Void,Void> |
getNavigator()
|
CClassInfoParent.Package |
getPackage(JPackage pkg)
|
XSComponent |
getSchemaComponent()
Deprecated. Always return null. Perhaps you are interested in schemaComponent? |
Map<String,String> |
getSchemaLocations()
|
SymbolSpace |
getSymbolSpace(String name)
|
CNonElement |
getTypeInfo(NType type)
|
CNonElement |
getTypeInfo(com.sun.xml.bind.v2.model.core.Ref<NType,NClass> ref)
|
Map<String,String> |
getXmlNs(String namespaceUri)
Not implemented in the compile-time model. |
boolean |
isPackageLevelAnnotations()
|
void |
setNameConverter(com.sun.xml.bind.api.impl.NameConverter nameConverter)
|
void |
setPackageLevelAnnotations(boolean packageLevelAnnotations)
|
Map<QName,TypeUse> |
typeUses()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final XSSchemaSet schemaComponent
public final JCodeModel codeModel
public final Options options
public boolean serializable
public Long serialVersionUID
public JClass rootClass
public JClass rootInterface
public ImplStructureStrategy strategy
public final SymbolSpace defaultSymbolSpace
| Constructor Detail |
|---|
public Model(Options opts,
JCodeModel cm,
com.sun.xml.bind.api.impl.NameConverter nc,
ClassNameAllocator allocator,
XSSchemaSet schemaComponent)
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 Detail |
|---|
public void setNameConverter(com.sun.xml.bind.api.impl.NameConverter nameConverter)
public final com.sun.xml.bind.api.impl.NameConverter getNameConverter()
public boolean isPackageLevelAnnotations()
public void setPackageLevelAnnotations(boolean packageLevelAnnotations)
public SymbolSpace getSymbolSpace(String name)
public Outline generateCode(Options opt,
ErrorReceiver receiver)
Outline object, which captures how the model objects
are mapped to the generated source code.
Add-ons can use those information to further augment the generated source code.
public final Map<QName,CClassInfo> createTopLevelBindings()
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.
public com.sun.xml.bind.v2.model.nav.Navigator<NType,NClass,Void,Void> getNavigator()
getNavigator in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public CNonElement getTypeInfo(NType type)
getTypeInfo in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public CBuiltinLeafInfo getAnyTypeInfo()
getAnyTypeInfo in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public CNonElement getTypeInfo(com.sun.xml.bind.v2.model.core.Ref<NType,NClass> ref)
getTypeInfo in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<NClass,CClassInfo> beans()
beans in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<NClass,CEnumLeafInfo> enums()
enums in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<QName,TypeUse> typeUses()
public Map<NType,? extends CArrayInfo> arrays()
arrays in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<NType,? extends CBuiltinLeafInfo> builtins()
builtins in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public CClassInfo getClassInfo(NClass t)
getClassInfo in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>
public CElementInfo getElementInfo(NClass scope,
QName name)
getElementInfo in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<QName,CElementInfo> getElementMappings(NClass scope)
getElementMappings in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Iterable<? extends CElementInfo> getAllElements()
getAllElements in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public XSComponent getSchemaComponent()
schemaComponent?
CCustomizable
getSchemaComponent in interface CCustomizablepublic Locator getLocator()
CCustomizable
getLocator in interface CCustomizablepublic CCustomizations getCustomizations()
getCustomizations in interface CCustomizablePlugin.getCustomizationURIs()public Map<String,String> getXmlNs(String namespaceUri)
getXmlNs in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public Map<String,String> getSchemaLocations()
getSchemaLocations in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public XmlNsForm getElementFormDefault(String nsUri)
getElementFormDefault in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public XmlNsForm getAttributeFormDefault(String nsUri)
getAttributeFormDefault in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public void dump(Result out)
dump in interface com.sun.xml.bind.v2.model.core.TypeInfoSet<NType,NClass,Void,Void>public CClassInfoParent.Package getPackage(JPackage pkg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||