org.eclipse.emf.ecore
Interface EStructuralFeature

All Superinterfaces:
EModelElement, ENamedElement, EObject, ETypedElement, Notifier
All Known Subinterfaces:
EAttribute, EReference
All Known Implementing Classes:
EStructuralFeatureImpl

public interface EStructuralFeature
extends ETypedElement

A representation of the model object 'EStructural Feature'.

The following features are supported:

See Also:
EcorePackage.getEStructuralFeature()

Inner Class Summary
static interface EStructuralFeature.Setting
          A representation of a value held by a feature of an object.
 
Field Summary
static int UNBOUNDED_MULTIPLICITY
           
 
Method Summary
 java.lang.Class getContainerClass()
           Returns the instance class of the containing class.
 java.lang.Object getDefaultValue()
          Returns the value of the 'Default Value' attribute.
 java.lang.String getDefaultValueLiteral()
          Returns the value of the 'Default Value Literal' attribute.
 EClass getEContainingClass()
          Returns the value of the 'EContaining Class' reference.
 int getFeatureID()
           Returns the ID relative to the containing class.
 int getLowerBound()
          Returns the value of the 'Lower Bound' attribute.
 int getUpperBound()
          Returns the value of the 'Upper Bound' attribute.
 boolean isChangeable()
          Returns the value of the 'Changeable' attribute.
 boolean isMany()
          Returns the value of the 'Many' attribute.
 boolean isRequired()
          Returns the value of the 'Required' attribute.
 boolean isTransient()
          Returns the value of the 'Transient' attribute.
 boolean isUnique()
          Returns the value of the 'Unique' 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(java.lang.Object value)
          A convenience method for setting the 'Default Value Literal' attribute.
 void setDefaultValueLiteral(java.lang.String value)
          Sets the value of the 'Default Value Literal' attribute.
 void setLowerBound(int value)
          Sets the value of the 'Lower Bound' attribute.
 void setTransient(boolean value)
          Sets the value of the 'Transient' attribute.
 void setUnique(boolean value)
          Sets the value of the 'Unique' attribute.
 void setUnsettable(boolean value)
          Sets the value of the 'Unsettable' attribute.
 void setUpperBound(int value)
          Sets the value of the 'Upper Bound' attribute.
 void setVolatile(boolean value)
          Sets the value of the 'Volatile' attribute.
 
Methods inherited from interface org.eclipse.emf.ecore.ETypedElement
getEType, setEType
 
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, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

UNBOUNDED_MULTIPLICITY

public static final int UNBOUNDED_MULTIPLICITY
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 java.lang.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(java.lang.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 java.lang.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(java.lang.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)

isUnique

public boolean isUnique()
Returns the value of the 'Unique' attribute. The default value is "true".
Returns:
the value of the 'Unique' attribute.
See Also:
setUnique(boolean), EcorePackage.getEStructuralFeature_Unique()

setUnique

public void setUnique(boolean value)
Sets the value of the 'Unique' attribute.
Parameters:
value - the new value of the 'Unique' attribute.
See Also:
isUnique()

getLowerBound

public int getLowerBound()
Returns the value of the 'Lower Bound' attribute.

It represents the minimum number of values that must appear in a valid instance.

Returns:
the value of the 'Lower Bound' attribute.
See Also:
setLowerBound(int), EcorePackage.getEStructuralFeature_LowerBound()

setLowerBound

public void setLowerBound(int value)
Sets the value of the 'Lower Bound' attribute.
Parameters:
value - the new value of the 'Lower Bound' attribute.
See Also:
getLowerBound()

getUpperBound

public int getUpperBound()
Returns the value of the 'Upper Bound' attribute. The default value is "1".

It represents the maximum number of values that must appear in a valid instance; the value -1 represents unbounded.

Returns:
the value of the 'Upper Bound' attribute.
See Also:
setUpperBound(int), EcorePackage.getEStructuralFeature_UpperBound()

setUpperBound

public void setUpperBound(int value)
Sets the value of the 'Upper Bound' attribute.
Parameters:
value - the new value of the 'Upper Bound' attribute.
See Also:
getUpperBound()

isMany

public boolean isMany()
Returns the value of the 'Many' attribute.
Returns:
the value of the 'Many' attribute.
See Also:
EcorePackage.getEStructuralFeature_Many()

isRequired

public boolean isRequired()
Returns the value of the 'Required' attribute.
Returns:
the value of the 'Required' attribute.
See Also:
EcorePackage.getEStructuralFeature_Required()

isUnsettable

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

An unsettable attribute 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 attribute 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()

getEContainingClass

public EClass getEContainingClass()
Returns the value of the 'EContaining Class' reference.

It represents the containing class of this feature.

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

getFeatureID

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

getContainerClass

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

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