org.eclipse.emf.ecore
Interface EStructuralFeature

All Superinterfaces:
EModelElement, ENamedElement, EObject, ETypedElement, Notifier
All Known Subinterfaces:
EAttribute, EReference, EStructuralFeature.Internal
All Known Implementing Classes:
EAttributeImpl, EReferenceImpl, EStructuralFeatureImpl

public interface EStructuralFeature
extends ETypedElement

A representation of the model object 'EStructural Feature'.

The following features are supported:

See Also:
EcorePackage.getEStructuralFeature()

Nested Class Summary
static interface EStructuralFeature.Internal
          Internal API implemented by all features.
static interface EStructuralFeature.Setting
          A representation of a value held by a feature of an object.
 
Field Summary
 
Fields inherited from interface org.eclipse.emf.ecore.ETypedElement
UNBOUNDED_MULTIPLICITY, UNSPECIFIED_MULTIPLICITY
 
Method Summary
 Class getContainerClass()
           Returns the instance class of the containing class.
 Object getDefaultValue()
          Returns the value of the 'Default Value' attribute
 String getDefaultValueLiteral()
          Returns the value of the 'Default Value Literal' attribute
 EClass getEContainingClass()
          Returns the value of the 'EContaining Class' container reference.
 int getFeatureID()
           Returns the ID relative to the containing class.
 boolean isChangeable()
          Returns the value of the 'Changeable' attribute.
 boolean isDerived()
          Returns the value of the 'Derived' attribute
 boolean isTransient()
          Returns the value of the 'Transient' attribute
 boolean isUnsettable()
          Returns the value of the 'Unsettable' attribute
 boolean isVolatile()
          Returns the value of the 'Volatile' attribute
 void setChangeable(boolean value)
          Sets the value of the 'Changeable' attribute
 void setDefaultValue(Object value)
          A convenience method for setting the 'Default Value Literal' attribute.
 void setDefaultValueLiteral(String value)
          Sets the value of the 'Default Value Literal' attribute
 void setDerived(boolean value)
          Sets the value of the 'Derived' attribute
 void setTransient(boolean value)
          Sets the value of the 'Transient' attribute
 void setUnsettable(boolean value)
          Sets the value of the 'Unsettable' attribute
 void setVolatile(boolean value)
          Sets the value of the 'Volatile' attribute
 
Methods inherited from interface org.eclipse.emf.ecore.ETypedElement
getEType, getLowerBound, getUpperBound, isMany, isOrdered, isRequired, isUnique, setEType, setLowerBound, setOrdered, setUnique, setUpperBound
 
Methods inherited from interface org.eclipse.emf.ecore.ENamedElement
getName, setName
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

isTransient

public boolean isTransient()
Returns the value of the 'Transient' attribute.

Returns:
the value of the 'Transient' attribute.
See Also:
setTransient(boolean), EcorePackage.getEStructuralFeature_Transient()

setTransient

public void setTransient(boolean value)
Sets the value of the 'Transient' attribute.

Parameters:
value - the new value of the 'Transient' attribute.
See Also:
isTransient()

isVolatile

public boolean isVolatile()
Returns the value of the 'Volatile' attribute.

Returns:
the value of the 'Volatile' attribute.
See Also:
setVolatile(boolean), EcorePackage.getEStructuralFeature_Volatile()

setVolatile

public void setVolatile(boolean value)
Sets the value of the 'Volatile' attribute.

Parameters:
value - the new value of the 'Volatile' attribute.
See Also:
isVolatile()

isChangeable

public boolean isChangeable()
Returns the value of the 'Changeable' attribute. The default value is "true".

Returns:
the value of the 'Changeable' attribute.
See Also:
setChangeable(boolean), EcorePackage.getEStructuralFeature_Changeable()

setChangeable

public void setChangeable(boolean value)
Sets the value of the 'Changeable' attribute.

Parameters:
value - the new value of the 'Changeable' attribute.
See Also:
isChangeable()

getDefaultValueLiteral

public String getDefaultValueLiteral()
Returns the value of the 'Default Value Literal' attribute.

It represents the serialized form of the default value.

Returns:
the value of the 'Default Value Literal' attribute.
See Also:
setDefaultValueLiteral(String), EcorePackage.getEStructuralFeature_DefaultValueLiteral()

setDefaultValueLiteral

public void setDefaultValueLiteral(String value)
Sets the value of the 'Default Value Literal' attribute.

Parameters:
value - the new value of the 'Default Value Literal' attribute.
See Also:
getDefaultValueLiteral()

getDefaultValue

public Object getDefaultValue()
Returns the value of the 'Default Value' attribute.

It represents the default value that feature must take on when an explicit value has not been set. Specifically, it may be non-null if the feature has an eType. If the defaultValueLiteral is null, it is simply the eType's intrinsic default value. Otherwise, if the eType is an EDataType and the defaultValueLiteral is non-null, it is the object created by the factory's EFactory.createFromString(org.eclipse.emf.ecore.EDataType, java.lang.String) method when invoked with those two objects as parameters.

Returns:
the value of the 'Default Value' attribute.
See Also:
EcorePackage.getEStructuralFeature_DefaultValue()

setDefaultValue

public void setDefaultValue(Object value)
A convenience method for setting the 'Default Value Literal' attribute.

If the feature has an eType that is an EDataType, the specified value is converted to a string using the factory's EFactory.convertToString(org.eclipse.emf.ecore.EDataType, java.lang.Object) method, and the defaultValueLiteral is set to the result.

See Also:
setDefaultValueLiteral(java.lang.String)

isUnsettable

public boolean isUnsettable()
Returns the value of the 'Unsettable' attribute.

An unsettable feature explicitly models the state of being set verses being unset and so provides a direct implementation for the reflective eIsSet. It is only applicable single-valued features. One effect of this setting is that, in addition to generating the methods getXyz and setXyz (if the feature is changeable), a reflective generator will generate the methods isSetXyz and unsetXyz.

Returns:
the value of the 'Unsettable' attribute.
See Also:
setUnsettable(boolean), EcorePackage.getEStructuralFeature_Unsettable()

setUnsettable

public void setUnsettable(boolean value)
Sets the value of the 'Unsettable' attribute.

Parameters:
value - the new value of the 'Unsettable' attribute.
See Also:
isUnsettable()

isDerived

public boolean isDerived()
Returns the value of the 'Derived' attribute.

A derived feature typically computes its value from those of other features. It will typically be transient and will often be volatile and not changeable. The default copier won't copy it.

Returns:
the value of the 'Derived' attribute.
See Also:
setDerived(boolean), EcorePackage.getEStructuralFeature_Derived()

setDerived

public void setDerived(boolean value)
Sets the value of the 'Derived' attribute.

Parameters:
value - the new value of the 'Derived' attribute.
See Also:
isDerived()

getEContainingClass

public EClass getEContainingClass()
Returns the value of the 'EContaining Class' container reference. It is bidirectional and its opposite is 'EStructural Features'.

It represents the containing class of this feature.

Returns:
the value of the 'EContaining Class' container reference.
See Also:
EcorePackage.getEStructuralFeature_EContainingClass(), EClass.getEStructuralFeatures()

getFeatureID

public int getFeatureID()
Returns the ID relative to the containing class.

Returns:
the relative ID.

getContainerClass

public Class getContainerClass()
Returns the instance class of the containing class.

Returns:
the instance class of the containing class.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.