Top Description Methods
com.sun.tools.xjc.outline

public Interface Outline

Known Direct Implementers
com.sun.tools.xjc.generator.bean.BeanGenerator
Imports
java.util.Collection, com.sun.codemodel.JClass, .JClassContainer, .JCodeModel, .JPackage, .JType, com.sun.tools.xjc.ErrorReceiver, com.sun.tools.xjc.model.CClassInfo, .CClassInfoParent, .CElementInfo, .CEnumLeafInfo, .CPropertyInfo, .CTypeRef, .Model, com.sun.tools.xjc.util.CodeModelClassFactory

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

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

Author
Kohsuke Kawaguchi

Method Summary

Modifier and TypeMethod and Description
public JClass
addRuntime(Class<?> clazz)

Copies the specified class into the user's package and returns a reference to it.

public Iterable<? extends PackageOutline>
getAllPackageContexts()

Gets all package-wise contexts at once.

public Collection<? extends ClassOutline>
getClasses()

Returns all the ClassOutlines known to this object.

public CodeModelClassFactory
getClassFactory()

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

public ClassOutline
getClazz(CClassInfo clazz)

Obtains per-class context information.

public JCodeModel
getCodeModel()

Short for getModel().codeModel.

public JClassContainer
public ElementOutline
getElement(CElementInfo ei)

If the CElementInfo generates a class, returns such a class.

public EnumOutline
public Collection<EnumOutline>
getEnums()

Gets all the EnumOutlines.

public ErrorReceiver
getErrorReceiver()

Any error during the back-end proccessing should be sent to this object.

public FieldOutline
getField(CPropertyInfo fu)

Gets the object that wraps the generated field for a given CPropertyInfo.

public Model
getModel()

This outline is for this model.

public PackageOutline

Returns:

If this grammar doesn't produce anything in the specified package, return null.
getPackageContext
(JPackage _Package)

Gets per-package context information.

public JType
resolve(CTypeRef ref, Aspect aspect)

Resolves a type reference to the actual (possibly generated) type.

Method Detail

addRuntimeback to summary
public JClass addRuntime(Class<?> clazz)

Copies the specified class into the user's package and returns a reference to it.

getAllPackageContextsback to summary
public Iterable<? extends PackageOutline> getAllPackageContexts()

Gets all package-wise contexts at once.

getClassesback to summary
public Collection<? extends ClassOutline> getClasses()

Returns all the ClassOutlines known to this object.

getClassFactoryback to summary
public CodeModelClassFactory getClassFactory()

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

getClazzback to summary
public ClassOutline getClazz(CClassInfo clazz)

Obtains per-class context information.

getCodeModelback to summary
public JCodeModel getCodeModel()

Short for getModel().codeModel.

getContainerback to summary
public JClassContainer getContainer(CClassInfoParent parent, Aspect aspect)
getElementback to summary
public ElementOutline getElement(CElementInfo ei)

If the CElementInfo generates a class, returns such a class. Otherwise return null.

getEnumback to summary
public EnumOutline getEnum(CEnumLeafInfo eli)
getEnumsback to summary
public Collection<EnumOutline> getEnums()

Gets all the EnumOutlines.

getErrorReceiverback to summary
public ErrorReceiver getErrorReceiver()

Any error during the back-end proccessing should be sent to this object.

getFieldback to summary
public FieldOutline getField(CPropertyInfo fu)

Gets the object that wraps the generated field for a given CPropertyInfo.

getModelback to summary
public Model getModel()

This outline is for this model.

getPackageContextback to summary
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:PackageOutline

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

resolveback to summary
public JType resolve(CTypeRef ref, Aspect aspect)

Resolves a type reference to the actual (possibly generated) type. Short for resolve(ref.getType(),aspect).