com.sun.tools.xjc.outline

Class Aspect

public class Aspect extends Enum<Aspect>

Sometimes a single JAXB-generated bean spans across multiple Java classes/interfaces. We call them "aspects of a bean".

This is an enumeration of all possible aspects.

Field Summary
static AspectEXPOSED
The exposed part of the bean.
static AspectIMPLEMENTATION
The part of the bean that holds all the implementations.
static List<Aspect>VALUES
An immutable list containing the values comprising this enum class in the order they're declared.
Method Summary
List<Aspect>family()
Returns an immutable list containing the values comprising this enum class in the order they're declared.
static AspectvalueOf(String name)
Static factory to return the enum constant pertaining to the given string name.

Field Detail

EXPOSED

public static final Aspect EXPOSED
The exposed part of the bean.

This corresponds to the content interface when we are geneting one. This would be the same as the IMPLEMENTATION when we are just generating beans.

This could be an interface, or it could be a class. We don't have any other ImplStructureStrategy at this point, but generally you can't assume anything about where this could be or whether that's equal to IMPLEMENTATION.

IMPLEMENTATION

public static final Aspect IMPLEMENTATION
The part of the bean that holds all the implementations.

This is always a class, never an interface.

VALUES

public static final List<Aspect> 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(Aspect c : Aspect.VALUES)
    System.out.println(c);

Method Detail

family

public final List<Aspect> 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.

valueOf

public static final Aspect 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.