|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.tools.xjc.generator.bean.BeanGenerator
public final class BeanGenerator
Generates fields and accessors.
| Method Summary | |
|---|---|
JClass |
addRuntime(Class clazz)
Copies the specified class into the user's package and returns a reference to it. |
static Outline |
generate(Model model,
ErrorReceiver _errorReceiver)
Generates beans into code model according to the BGM, and produces the reflection model. |
void |
generateAdapterIfNecessary(CPropertyInfo prop,
JAnnotatable field)
Generates XmlJavaTypeAdapter from PropertyInfo if necessary. |
JClass |
generateStaticClass(Class src,
JPackage out)
|
Iterable<? extends PackageOutline> |
getAllPackageContexts()
Gets all package-wise contexts at once. |
Collection<ClassOutlineImpl> |
getClasses()
Returns all the ClassOutlines known to this object. |
CodeModelClassFactory |
getClassFactory()
Gets a reference to new CodeModelClassFactory(getErrorHandler()). |
ClassOutlineImpl |
getClazz(CClassInfo bean)
Obtains per-class context information. |
JCodeModel |
getCodeModel()
Short for getModel().codeModel. |
JClassContainer |
getContainer(CClassInfoParent parent,
Aspect aspect)
|
com.sun.tools.xjc.generator.bean.ElementOutlineImpl |
getElement(CElementInfo ei)
If the CElementInfo generates a class,
returns such a class. |
EnumOutline |
getEnum(CEnumLeafInfo eli)
|
Collection<EnumOutline> |
getEnums()
Gets all the EnumOutlines. |
ErrorReceiver |
getErrorReceiver()
Any error during the back-end proccessing should be sent to this object. |
FieldOutline |
getField(CPropertyInfo prop)
Gets the object that wraps the generated field for a given CPropertyInfo. |
Model |
getModel()
This outline is for this model. |
PackageOutlineImpl |
getPackageContext(JPackage p)
Gets per-package context information. |
JPackage[] |
getUsedPackages(Aspect aspect)
Returns all used JPackages. |
JType |
resolve(CTypeRef ref,
Aspect a)
Resolves a type reference to the actual (possibly generated) type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Outline generate(Model model,
ErrorReceiver _errorReceiver)
_errorReceiver - This object will receive all the errors discovered
during the back-end stage.
Outline which will in turn
be used to further generate marshaller/unmarshaller,
or null if the processing fails (errors should have been
reported to the error recevier.)public Model getModel()
Outline
getModel in interface Outlinepublic JCodeModel getCodeModel()
OutlinegetModel().codeModel.
getCodeModel in interface Outline
public JClassContainer getContainer(CClassInfoParent parent,
Aspect aspect)
getContainer in interface Outline
public final JType resolve(CTypeRef ref,
Aspect a)
Outlineresolve(ref.getType(),aspect).
resolve in interface Outlinepublic final JPackage[] getUsedPackages(Aspect aspect)
public ErrorReceiver getErrorReceiver()
Outline
getErrorReceiver in interface Outlinepublic CodeModelClassFactory getClassFactory()
Outlinenew CodeModelClassFactory(getErrorHandler()).
getClassFactory in interface Outlinepublic PackageOutlineImpl getPackageContext(JPackage p)
Outline
getPackageContext in interface Outlinepublic Collection<ClassOutlineImpl> getClasses()
OutlineClassOutlines known to this object.
getClasses in interface Outlinepublic ClassOutlineImpl getClazz(CClassInfo bean)
Outline
getClazz in interface Outlinepublic com.sun.tools.xjc.generator.bean.ElementOutlineImpl getElement(CElementInfo ei)
OutlineCElementInfo generates a class,
returns such a class. Otherwise return null.
getElement in interface Outlinepublic EnumOutline getEnum(CEnumLeafInfo eli)
getEnum in interface Outlinepublic Collection<EnumOutline> getEnums()
OutlineEnumOutlines.
getEnums in interface Outlinepublic Iterable<? extends PackageOutline> getAllPackageContexts()
Outline
getAllPackageContexts in interface Outlinepublic FieldOutline getField(CPropertyInfo prop)
OutlineCPropertyInfo.
getField in interface Outline
public final void generateAdapterIfNecessary(CPropertyInfo prop,
JAnnotatable field)
XmlJavaTypeAdapter from PropertyInfo if necessary.
Also generates other per-property annotations
(such as XmlID, XmlIDREF, and XmlMimeType if necessary.
public final JClass addRuntime(Class clazz)
Outline
addRuntime in interface Outline
public JClass generateStaticClass(Class src,
JPackage out)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||