com.sun.tools.xjc.generator.bean

Class ImplStructureStrategy

class ImplStructureStrategy extends Enum<ImplStructureStrategy>

Decides how a bean token is mapped to the generated classes.

The actual implementations of this interface is tightly coupled with the backend, but the front-end gets to choose which strategy to be used.

Nested Class Summary
static classImplStructureStrategy.Result
Field Summary
static ImplStructureStrategyBEAN_ONLY
static ImplStructureStrategyINTF_AND_IMPL
static List<ImplStructureStrategy>VALUES
An immutable list containing the values comprising this enum class in the order they're declared.
Method Summary
protected ImplStructureStrategy.ResultcreateClasses(Outline outline, CClassInfo bean)
Generates beans only.
protected ImplStructureStrategy.ResultcreateClasses(Outline outline, CClassInfo bean)
Generates the interfaces to describe beans (content interfaces) and then the beans themselves in a hidden impl package.
protected abstract ImplStructureStrategy.ResultcreateClasses(Outline outline, CClassInfo bean)
Creates class(es) for the given bean.
protected MethodWritercreateMethodWriter(ClassOutlineImpl target)
protected MethodWritercreateMethodWriter(ClassOutlineImpl target)
protected abstract MethodWritercreateMethodWriter(ClassOutlineImpl target)
List<ImplStructureStrategy>family()
Returns an immutable list containing the values comprising this enum class in the order they're declared.
protected JPackagegetPackage(JPackage pkg, Aspect a)
protected JPackagegetPackage(JPackage pkg, Aspect a)
protected abstract JPackagegetPackage(JPackage pkg, Aspect a)
Gets the specified aspect of the given package.
static ImplStructureStrategyvalueOf(String name)
Static factory to return the enum constant pertaining to the given string name.
protected void_extends(ClassOutlineImpl derived, ClassOutlineImpl base)
protected void_extends(ClassOutlineImpl derived, ClassOutlineImpl base)
protected abstract void_extends(ClassOutlineImpl derived, ClassOutlineImpl base)
Sets up an inheritance relationship.

Field Detail

BEAN_ONLY

public static final ImplStructureStrategy BEAN_ONLY

INTF_AND_IMPL

public static final ImplStructureStrategy INTF_AND_IMPL

VALUES

public static final List<ImplStructureStrategy> VALUES
An immutable list containing the values comprising this enum class in the order they're declared. This field may be used to iterate over the constants as follows:
for(ImplStructureStrategy c : ImplStructureStrategy.VALUES)
    System.out.println(c);

Method Detail

createClasses

protected ImplStructureStrategy.Result createClasses(Outline outline, CClassInfo bean)
Generates beans only. The simplest code generation.

createClasses

protected ImplStructureStrategy.Result createClasses(Outline outline, CClassInfo bean)
Generates the interfaces to describe beans (content interfaces) and then the beans themselves in a hidden impl package. Similar to JAXB 1.0.

createClasses

protected abstract ImplStructureStrategy.Result createClasses(Outline outline, CClassInfo bean)
Creates class(es) for the given bean.

createMethodWriter

protected MethodWriter createMethodWriter(ClassOutlineImpl target)

createMethodWriter

protected MethodWriter createMethodWriter(ClassOutlineImpl target)

createMethodWriter

protected abstract MethodWriter createMethodWriter(ClassOutlineImpl target)

family

public final List<ImplStructureStrategy> family()
Returns an immutable list containing the values comprising this enum class in the order they're declared. This instance method simply returns VALUES. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES.

Returns: an immutable list containing the values comprising this enum class, in the order they're declared.

getPackage

protected JPackage getPackage(JPackage pkg, Aspect a)

getPackage

protected JPackage getPackage(JPackage pkg, Aspect a)

getPackage

protected abstract JPackage getPackage(JPackage pkg, Aspect a)
Gets the specified aspect of the given package.

valueOf

public static final ImplStructureStrategy valueOf(String name)
Static factory to return the enum constant pertaining to the given string name. The string must match exactly an identifier used to declare an enum constant in this type.

Throws: IllegalArgumentException if this enum class has no constant with the specified name.

_extends

protected void _extends(ClassOutlineImpl derived, ClassOutlineImpl base)

_extends

protected void _extends(ClassOutlineImpl derived, ClassOutlineImpl base)

_extends

protected abstract void _extends(ClassOutlineImpl derived, ClassOutlineImpl base)
Sets up an inheritance relationship.