com.sun.tools.xjc.outline

Interface Outline

public interface Outline

Root of the outline. Captures which code is generated for which model component.

This object also provides access to varioues utilities, such as error reporting etc, for the convenience of code that builds the outline.

Method Summary
JClassaddRuntime(Class clazz)
Copies the specified class into the user's package and returns a reference to it.
Iterable<? extends PackageOutline>getAllPackageContexts()
Gets all package-wise contexts at once.
Collection<? extends ClassOutline>getClasses()
Returns all the ClassOutlines known to this object.
CodeModelClassFactorygetClassFactory()
Gets a reference to new CodeModelClassFactory(getErrorHandler()).
ClassOutlinegetClazz(CClassInfo clazz)
Obtains per-class context information.
JCodeModelgetCodeModel()
Short for {@code getModel().codeModel}.
JClassContainergetContainer(CClassInfoParent parent, Aspect aspect)
ElementOutlinegetElement(CElementInfo ei)
If the CElementInfo generates a class, returns such a class.
EnumOutlinegetEnum(CEnumLeafInfo eli)
Collection<EnumOutline>getEnums()
Gets all the EnumOutlines.
ErrorReceivergetErrorReceiver()
Any error during the back-end proccessing should be sent to this object.
FieldOutlinegetField(CPropertyInfo fu)
Gets the object that wraps the generated field for a given CPropertyInfo.
ModelgetModel()
This outline is for this model.
PackageOutlinegetPackageContext(JPackage _Package)
Gets per-package context information.
JTyperesolve(CTypeRef ref, Aspect aspect)
Resolves a type reference to the actual (possibly generated) type.

Method Detail

addRuntime

public JClass addRuntime(Class clazz)
Copies the specified class into the user's package and returns a reference to it.

getAllPackageContexts

public Iterable<? extends PackageOutline> getAllPackageContexts()
Gets all package-wise contexts at once.

getClasses

public Collection<? extends ClassOutline> getClasses()
Returns all the ClassOutlines known to this object.

getClassFactory

public CodeModelClassFactory getClassFactory()
Gets a reference to new CodeModelClassFactory(getErrorHandler()).

getClazz

public ClassOutline getClazz(CClassInfo clazz)
Obtains per-class context information.

getCodeModel

public JCodeModel getCodeModel()
Short for {@code getModel().codeModel}.

getContainer

public JClassContainer getContainer(CClassInfoParent parent, Aspect aspect)

getElement

public ElementOutline getElement(CElementInfo ei)
If the CElementInfo generates a class, returns such a class. Otherwise return null.

getEnum

public EnumOutline getEnum(CEnumLeafInfo eli)

getEnums

public Collection<EnumOutline> getEnums()
Gets all the EnumOutlines.

getErrorReceiver

public ErrorReceiver getErrorReceiver()
Any error during the back-end proccessing should be sent to this object.

getField

public FieldOutline getField(CPropertyInfo fu)
Gets the object that wraps the generated field for a given CPropertyInfo.

getModel

public Model getModel()
This outline is for this model.

getPackageContext

public PackageOutline getPackageContext(JPackage _Package)
Gets per-package context information. This method works for every visible package (those packages which are supposed to be used by client applications.)

Returns: If this grammar doesn't produce anything in the specified package, return null.

resolve

public JType resolve(CTypeRef ref, Aspect aspect)
Resolves a type reference to the actual (possibly generated) type. Short for {@code resolve(ref.getType(),aspect)}.