org.eclipse.jpt.jaxb.core.context
Interface JaxbEnumConstant

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JaxbContextNode, JaxbNode, Model

public interface JaxbEnumConstant
extends JaxbContextNode

Represents a JAXB enum constant. (A constant inside an enum with either an explicit or implicit @XmlEnumValue annotation)

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
3.0
Version:
3.0

Field Summary
static java.lang.String SPECIFIED_VALUE_PROPERTY
           
 
Method Summary
 java.lang.String getDefaultValue()
          The default value will be the name of the enum constant.
 java.lang.String getName()
          Return the name of the enum constant.
 JavaResourceEnumConstant getResourceEnumConstant()
           
 java.lang.String getSpecifiedValue()
          Corresponds to the XmlEnumValue annotation 'value' element
 java.lang.String getValue()
          Return the enum constant's value, whether specified or default.
 void setSpecifiedValue(java.lang.String value)
           
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.context.JaxbContextNode
getContextRoot, getResourceType, synchronizeWithResourceModel, update
 
Methods inherited from interface org.eclipse.jpt.jaxb.core.JaxbNode
getJaxbProject, getParent, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.IResourcePart
getResource
 

Field Detail

SPECIFIED_VALUE_PROPERTY

static final java.lang.String SPECIFIED_VALUE_PROPERTY
See Also:
Constant Field Values
Method Detail

getResourceEnumConstant

JavaResourceEnumConstant getResourceEnumConstant()

getName

java.lang.String getName()
Return the name of the enum constant. This will not change, a new JaxbEnumConstant will be built if the name changes.


getValue

java.lang.String getValue()
Return the enum constant's value, whether specified or default.


getDefaultValue

java.lang.String getDefaultValue()
The default value will be the name of the enum constant. It will be used if the XmlEnumValue annotation is null.

See Also:
getName()

getSpecifiedValue

java.lang.String getSpecifiedValue()
Corresponds to the XmlEnumValue annotation 'value' element


setSpecifiedValue

void setSpecifiedValue(java.lang.String value)