Top Description Fields Constructors Methods
com.sun.tools.xjc.model

public final Class CEnumConstant

extends Object
implements EnumConstant<NType, NClass>, CCustomizable
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.model.CCustomizable, org.glassfish.jaxb.core.v2.model.core.EnumConstant
Imports
com.sun.tools.xjc.model.nav.NClass, .NType, org.glassfish.jaxb.core.v2.model.core.EnumConstant, com.sun.xml.xsom.XSComponent, org.xml.sax.Locator

Enumeration constant.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final CCustomizations
public final String
javadoc

Javadoc comment.

private final String
lexical

Lexical representation of this enum constant.

private final Locator
public final String
name

Name of the constant.

private CEnumLeafInfo
private final XSComponent

Constructor Summary

AccessConstructor and Description
public
CEnumConstant(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc)

Method Summary

Modifier and TypeMethod and Description
public CCustomizations
getCustomizations()

Implements com.sun.tools.xjc.model.CCustomizable.getCustomizations.

Gets the list of customizations attached to this model component.

public CEnumLeafInfo
public String
public Locator
getLocator()

Implements com.sun.tools.xjc.model.CCustomizable.getLocator.

Gets the source location in the schema from which this model component is created.

public String
public XSComponent
getSchemaComponent()

Implements com.sun.tools.xjc.model.CCustomizable.getSchemaComponent.

If this model object is built from XML Schema, this property returns a schema component from which the model is built.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

customizationsback to summary
private final CCustomizations customizations
javadocback to summary
public final String javadoc

Javadoc comment. Can be null.

lexicalback to summary
private final String lexical

Lexical representation of this enum constant. Always non-null.

locatorback to summary
private final Locator locator
nameback to summary
public final String name

Name of the constant.

parentback to summary
private CEnumLeafInfo parent
sourceback to summary
private final XSComponent source

Constructor Detail

CEnumConstantback to summary
public CEnumConstant(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc)

Method Detail

getCustomizationsback to summary
public CCustomizations getCustomizations()

Implements com.sun.tools.xjc.model.CCustomizable.getCustomizations.

Doc from com.sun.tools.xjc.model.CCustomizable.getCustomizations.

Gets the list of customizations attached to this model component.

Annotations
@Override
getEnclosingClassback to summary
public CEnumLeafInfo getEnclosingClass()

Implements org.glassfish.jaxb.core.v2.model.core.EnumConstant.getEnclosingClass.

Doc from org.glassfish.jaxb.core.v2.model.core.EnumConstant.getEnclosingClass.

Gets the EnumLeafInfo to which this constant belongs to.

Annotations
@Override
getLexicalValueback to summary
public String getLexicalValue()

Implements org.glassfish.jaxb.core.v2.model.core.EnumConstant.getLexicalValue.

Doc from org.glassfish.jaxb.core.v2.model.core.EnumConstant.getLexicalValue.

Lexical value of this constant.

This value should be evaluated against EnumLeafInfo#getBaseType() to obtain the typed value.

This is the same value as written in the XmlEnumValue annotation. In the above example, this method returns "1" and "2".

Annotations
@Override
getLocatorback to summary
public Locator getLocator()

Implements com.sun.tools.xjc.model.CCustomizable.getLocator.

Doc from com.sun.tools.xjc.model.CCustomizable.getLocator.

Gets the source location in the schema from which this model component is created.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.glassfish.jaxb.core.v2.model.core.EnumConstant.getName.

Doc from org.glassfish.jaxb.core.v2.model.core.EnumConstant.getName.

Gets the constant name.

In the above example this method return "ONE" and "TWO".

Annotations
@Override
getSchemaComponentback to summary
public XSComponent getSchemaComponent()

Implements com.sun.tools.xjc.model.CCustomizable.getSchemaComponent.

Doc from com.sun.tools.xjc.model.CCustomizable.getSchemaComponent.

If this model object is built from XML Schema, this property returns a schema component from which the model is built.

Annotations
@Override
setParentback to summary
pack-priv void setParent(CEnumLeafInfo parent)