|
||||||||||
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.
Field Summary | |
---|---|
(package private) Map<CElementInfo,ElementOutlineImpl> |
elements
elements that generate classes to the generated classes. |
Method Summary | |
---|---|
com.sun.codemodel.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,
com.sun.codemodel.JAnnotatable field)
Generates XmlJavaTypeAdapter from PropertyInfo if necessary. |
com.sun.codemodel.JClass |
generateStaticClass(Class src,
com.sun.codemodel.JPackage out)
|
Iterable<? extends PackageOutline> |
getAllPackageContexts()
Gets all package-wise contexts at once. |
Collection<ClassOutlineImpl> |
getClasses()
Returns all the ClassOutline s known to this object. |
CodeModelClassFactory |
getClassFactory()
Gets a reference to new CodeModelClassFactory(getErrorHandler()) . |
ClassOutlineImpl |
getClazz(CClassInfo bean)
Obtains per-class context information. |
com.sun.codemodel.JCodeModel |
getCodeModel()
Short for getModel().codeModel . |
com.sun.codemodel.JClassContainer |
getContainer(CClassInfoParent parent,
Aspect aspect)
|
ElementOutlineImpl |
getElement(CElementInfo ei)
If the CElementInfo generates a class,
returns such a class. |
EnumOutline |
getEnum(CEnumLeafInfo eli)
|
Collection<EnumOutline> |
getEnums()
Gets all the EnumOutline s. |
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(com.sun.codemodel.JPackage p)
Gets per-package context information. |
com.sun.codemodel.JPackage[] |
getUsedPackages(Aspect aspect)
Returns all used JPackages. |
com.sun.codemodel.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 |
Field Detail |
---|
final Map<CElementInfo,ElementOutlineImpl> elements
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 Outline
public com.sun.codemodel.JCodeModel getCodeModel()
Outline
getModel().codeModel
.
getCodeModel
in interface Outline
public com.sun.codemodel.JClassContainer getContainer(CClassInfoParent parent, Aspect aspect)
getContainer
in interface Outline
public final com.sun.codemodel.JType resolve(CTypeRef ref, Aspect a)
Outline
resolve(ref.getType(),aspect)
.
resolve
in interface Outline
public final com.sun.codemodel.JPackage[] getUsedPackages(Aspect aspect)
public ErrorReceiver getErrorReceiver()
Outline
getErrorReceiver
in interface Outline
public CodeModelClassFactory getClassFactory()
Outline
new CodeModelClassFactory(getErrorHandler())
.
getClassFactory
in interface Outline
public PackageOutlineImpl getPackageContext(com.sun.codemodel.JPackage p)
Outline
getPackageContext
in interface Outline
public Collection<ClassOutlineImpl> getClasses()
Outline
ClassOutline
s known to this object.
getClasses
in interface Outline
public ClassOutlineImpl getClazz(CClassInfo bean)
Outline
getClazz
in interface Outline
public ElementOutlineImpl getElement(CElementInfo ei)
Outline
CElementInfo
generates a class,
returns such a class. Otherwise return null.
getElement
in interface Outline
public EnumOutline getEnum(CEnumLeafInfo eli)
getEnum
in interface Outline
public Collection<EnumOutline> getEnums()
Outline
EnumOutline
s.
getEnums
in interface Outline
public Iterable<? extends PackageOutline> getAllPackageContexts()
Outline
getAllPackageContexts
in interface Outline
public FieldOutline getField(CPropertyInfo prop)
Outline
CPropertyInfo
.
getField
in interface Outline
public final void generateAdapterIfNecessary(CPropertyInfo prop, com.sun.codemodel.JAnnotatable field)
XmlJavaTypeAdapter
from PropertyInfo
if necessary.
Also generates other per-property annotations
(such as XmlID
, XmlIDREF
, and XmlMimeType
if necessary.
public final com.sun.codemodel.JClass addRuntime(Class clazz)
Outline
addRuntime
in interface Outline
public com.sun.codemodel.JClass generateStaticClass(Class src, com.sun.codemodel.JPackage out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |