Package org.eclipse.emf.cdo.common.model
Class CDOFeatureRef
java.lang.Object
org.eclipse.emf.cdo.common.model.CDOFeatureRef
- All Implemented Interfaces:
Serializable,CDOModelElementRef<EStructuralFeature>
A symbolic reference to an
EStructuralFeature, identified by its
declaring classifier and feature name.- Since:
- 4.29
- Author:
- Eike Stepper
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCDOFeatureRef(CDOClassifierRef classifierRef, String featureName) Creates a reference from a symbolic declaring classifier and feature name.Reads a symbolic feature reference without resolving its classifier.CDOFeatureRef(EStructuralFeature feature) Creates a reference using the feature's declaring class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the symbolic declaring classifier.Returns the symbolic feature name.inthashCode()Resolves this reference against a declaring class.resolve(EPackage.Registry packageRegistry) Resolves this reference against the supplied package registry.toString()voidwrite(CDODataOutput out) Writes the classifier reference followed by the feature name.
-
Constructor Details
-
CDOFeatureRef
Creates a reference using the feature's declaring class. In particular, inherited features are identified byEStructuralFeature.getEContainingClass().- Parameters:
feature- the feature to reference
-
CDOFeatureRef
Creates a reference from a symbolic declaring classifier and feature name.- Parameters:
classifierRef- the symbolic declaring classifierfeatureName- the feature name
-
CDOFeatureRef
Reads a symbolic feature reference without resolving its classifier.- Parameters:
in- the data input- Throws:
IOException- if the reference cannot be read
-
-
Method Details
-
write
Writes the classifier reference followed by the feature name.- Parameters:
out- the data output- Throws:
IOException- if the reference cannot be written
-
getClassifierRef
Returns the symbolic declaring classifier.- Returns:
- the declaring classifier reference
-
getFeatureName
Returns the symbolic feature name.- Returns:
- the feature name
-
resolve
Description copied from interface:CDOModelElementRefResolves this reference against the supplied package registry.- Specified by:
resolvein interfaceCDOModelElementRef<EStructuralFeature>- Parameters:
packageRegistry- the registry to use for explicit resolution- Returns:
- the referenced model element, or
nullif the symbolic element is not present in the resolved package
-
resolve
Resolves this reference against a declaring class. An inherited feature is not accepted when the supplied class is not its declaring class.- Parameters:
eClass- the explicitly resolved declaring class- Returns:
- the declared feature, or
nullif it is absent
-
hashCode
public int hashCode() -
equals
-
toString
-