Package org.eclipse.emf.cdo.common.model
Class CDOPackageRef
java.lang.Object
org.eclipse.emf.cdo.common.model.CDOPackageRef
- All Implemented Interfaces:
Serializable,CDOModelElementRef<EPackage>
A symbolic reference to an
EPackage, identified by its namespace URI.- Since:
- 4.29
- Author:
- Eike Stepper
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCDOPackageRef(String packageURI) Creates a reference from a namespace URI.Reads a symbolic package reference.CDOPackageRef(EPackage ePackage) Creates a reference from an EMF package without consulting a registry. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the package namespace URI.inthashCode()resolve(EPackage.Registry packageRegistry) Resolves this reference against the supplied package registry.toString()voidwrite(CDODataOutput out) Writes only the symbolic package URI.
-
Constructor Details
-
CDOPackageRef
Creates a reference from an EMF package without consulting a registry.- Parameters:
ePackage- the package whose namespace URI identifies the reference
-
CDOPackageRef
Creates a reference from a namespace URI.- Parameters:
packageURI- the package namespace URI
-
CDOPackageRef
Reads a symbolic package reference. Reading does not resolve the package.- Parameters:
in- the data input- Throws:
IOException- if the URI cannot be read
-
-
Method Details
-
write
Writes only the symbolic package URI.- Parameters:
out- the data output- Throws:
IOException- if the URI cannot be written
-
getPackageURI
Returns the package namespace URI.- Returns:
- the package namespace URI
-
resolve
Description copied from interface:CDOModelElementRefResolves this reference against the supplied package registry.- Specified by:
resolvein interfaceCDOModelElementRef<EPackage>- 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
-
hashCode
public int hashCode() -
equals
-
toString
-