Modifier and Type | Method and Description |
---|---|
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
ClassOutline s 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
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(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.
|
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
public JCodeModel getCodeModel()
Outline
getModel().codeModel
.getCodeModel
in interface Outline
public JClassContainer getContainer(CClassInfoParent parent, Aspect aspect)
getContainer
in interface Outline
public final JType resolve(CTypeRef ref, Aspect a)
Outline
resolve(ref.getType(),aspect)
.public final 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(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
public com.sun.tools.xjc.generator.bean.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)
public Collection<EnumOutline> getEnums()
Outline
EnumOutline
s.public Iterable<? extends PackageOutline> getAllPackageContexts()
Outline
getAllPackageContexts
in interface Outline
public FieldOutline getField(CPropertyInfo prop)
Outline
CPropertyInfo
.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
Copyright © 2017 JBoss by Red Hat. All rights reserved.