|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.ocl.parser.TypeResolverImpl
AbstractTypeResolver class,
instead, with the AbstractEnvironment.
public class TypeResolverImpl
Default implementation of the TypeResolver interface, storing the types
that it generates in the a resource to support persistence of
OCLExpressions referencing these types.
It is recommended that clients extend this class to customize resolution of
types based on their models, rather than implementing the interface. Simply
override the protected createXyzPackage() methods to determine
where the resolved types are stored and the resolveXyzType()
methods to create or find types are required.
| Constructor Summary | |
|---|---|
TypeResolverImpl()
Deprecated. Initializes me. |
|
TypeResolverImpl(Resource resource)
Deprecated. Initializes me with a resource in which I will persist the model-based types that I generate in my associated Environment. |
|
| Method Summary | |
|---|---|
protected EPackage |
createAdditionalFeaturesPackage()
Deprecated. Creates the package containing the additional operations and properties parsed in my environment. |
protected EPackage |
createCollectionPackage()
Deprecated. Creates the package containing the collection types that I generate. |
protected CollectionType |
createCollectionType(CollectionKind kind,
EClassifier elementType)
Deprecated. Creates a new collection type of the specified kind and element
type, assuming that it does not already exist. |
protected EPackage |
createMessagePackage()
Deprecated. Creates the package containing the message types that I generate. |
protected MessageType |
createMessageType(ENamedElement element)
Deprecated. Creates a new message type for the specified element,
assuming that it does not already exist. |
protected Resource |
createResource()
Deprecated. Creates the resource that persists my generated types. |
protected EClass |
createShadowClass(EClassifier type)
Deprecated. Creates the shadow class to contain additional features defined for the specified OCL type. |
protected EPackage |
createTuplePackage()
Deprecated. Creates the package containing the tuple types that I generate. |
protected TupleType |
createTupleType(List parts)
Deprecated. Creates a new tuple type from the specified parts, assuming that
it does not already exist. |
protected EPackage |
createTypePackage()
Deprecated. Creates the package containing the type types that I generate. |
protected TypeType |
createTypeType(EClassifier type)
Deprecated. Creates a new type type for the specified type,
assuming that it does not already exist. |
protected CollectionType |
findCollectionType(CollectionKind kind,
EClassifier elementType)
Deprecated. Finds an existing collection type matching the specified kind and
element type, if any has already been created. |
protected EOperation |
findMatchingOperation(EClass shadow,
EOperation operation)
Deprecated. Finds an operation already existing in the specified shadow
class that matches the specified operation signature. |
protected EStructuralFeature |
findMatchingProperty(EClass shadow,
EStructuralFeature property)
Deprecated. Finds a property already existing in the specified shadow
class that matches the specified property signature. |
protected MessageType |
findMessageType(ENamedElement element)
Deprecated. Finds an existing message type matching the specified element,
if any has already been created. |
protected EClass |
findShadowClass(EClassifier type)
Deprecated. Finds the shadow class to contain additional features defined for the specified OCL type, if it already exists. |
protected TupleType |
findTupleType(List parts)
Deprecated. Finds an existing tuple type matching the specified parts, if any
has already been created. |
protected TypeType |
findTypeType(EClassifier type)
Deprecated. Finds an existing type type matching the specified type,
if any has already been created. |
EPackage |
getAdditionalFeaturesPackage()
Deprecated. Obtains the package containing the additional operations and properties parsed in my environment. |
EPackage |
getCollectionPackage()
Deprecated. Obtains the package containing the collection types that I generate. |
EPackage |
getMessagePackage()
Deprecated. Obtains the package containing the message types that I generate. |
Resource |
getResource()
Deprecated. Obtains the resource in which the types that I generate are stored for persistence. |
EPackage |
getTuplePackage()
Deprecated. Obtains the package containing the tuple types that I generate. |
EPackage |
getTypePackage()
Deprecated. Obtains the package containing the type types that I generate. |
EClassifier |
resolve(EClassifier type)
Deprecated. Resolves the specified type, returning my own persistent
type instance representing the same OCL type. |
EOperation |
resolveAdditionalOperation(EClassifier owner,
EOperation operation)
Deprecated. Resolves the specified "additional operation" defined by the OCL client on the specified owner type. |
EStructuralFeature |
resolveAdditionalProperty(EClassifier owner,
EStructuralFeature property)
Deprecated. Resolves the specified "additional property" defined by the OCL client on the specified owner type. |
CollectionType |
resolveCollectionType(CollectionKind kind,
EClassifier elementType)
Deprecated. Resolves the collection type of the specified kind and
element type, either created anew or previously created. |
MessageType |
resolveMessageType(EClass signal)
Deprecated. Resolves the type for a message expression referencing the specified signal. |
MessageType |
resolveMessageType(EOperation operation)
Deprecated. Resolves the type for a message expression referencing the specified operation. |
TupleType |
resolveTupleType(List parts)
Deprecated. Resolves the tuple type consisting of the specified parts,
in no particular order, either created anew or previously created. |
TypeType |
resolveTypeType(EClassifier type)
Deprecated. Resolves the type for a type expression referencing the specified type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeResolverImpl()
public TypeResolverImpl(Resource resource)
Environment.
resource - my resource| Method Detail |
|---|
public EClassifier resolve(EClassifier type)
TypeResolvertype, returning my own persistent
type instance representing the same OCL type.
The type may have been newly created by the parser and be
a duplicate of a type previously resolved, or it may actually be a
type that was previously resolved. In the latter case, the
type is returned as is. The null type is
considered to be resolved (i.e., the result is also null).
Usually, this method will delegate to one of the
resolveXyzType() methods defined by this interface.
resolve in interface TypeResolvertype - a type to resolve
type if it is already resolvedpublic Resource getResource()
TypeResolver
getResource in interface TypeResolverprotected Resource createResource()
public EPackage getCollectionPackage()
protected EPackage createCollectionPackage()
public CollectionType resolveCollectionType(CollectionKind kind,
EClassifier elementType)
TypeResolverkind and
element type, either created anew or previously created.
resolveCollectionType in interface TypeResolverkind - the kind of collection type to createelementType - the element type
protected CollectionType createCollectionType(CollectionKind kind,
EClassifier elementType)
kind and element
type, assuming that it does not already exist.
kind - the kind of collection to createelementType - the collection's element type
protected CollectionType findCollectionType(CollectionKind kind,
EClassifier elementType)
kind and
element type, if any has already been created.
kind - the element kind to search forelementType - the element type to search for
null if none foundpublic EPackage getTuplePackage()
protected EPackage createTuplePackage()
public TupleType resolveTupleType(List parts)
TypeResolverparts,
in no particular order, either created anew or previously created. The
resulting type is uniquely defined by the names and types of its parts, and
twp tuple types are considered equal if they have the same number of parts
and their parts correspond one-for-one in name and type (order is not
significant).
resolveTupleType in interface TypeResolverparts - a list of TypedElements defining the name and type of
each tuple part. The part names are unique
protected TupleType createTupleType(List parts)
parts, assuming that
it does not already exist.
parts - the TypedElements describing the tuple parts
protected TupleType findTupleType(List parts)
parts, if any
has already been created.
parts - the TypedElements describing the tuple parts
null if none foundpublic EPackage getTypePackage()
protected EPackage createTypePackage()
public TypeType resolveTypeType(EClassifier type)
TypeResolvertype. This is, effectively, the OCL metatype counterpart
for the specified model type.
resolveTypeType in interface TypeResolvertype - a model type
protected TypeType createTypeType(EClassifier type)
type,
assuming that it does not already exist.
type - the referenced model type
protected TypeType findTypeType(EClassifier type)
type,
if any has already been created.
type - the referenced model type
null if none foundpublic EPackage getMessagePackage()
protected EPackage createMessagePackage()
public MessageType resolveMessageType(EOperation operation)
TypeResolveroperation.
resolveMessageType in interface TypeResolveroperation - the operation call that the message represents
public MessageType resolveMessageType(EClass signal)
TypeResolversignal.
resolveMessageType in interface TypeResolversignal - the signal send that the message represents
protected MessageType createMessageType(ENamedElement element)
element,
assuming that it does not already exist.
element - the operation or signal referenced by the message type
protected MessageType findMessageType(ENamedElement element)
element,
if any has already been created.
element - the referenced model element
null if none foundpublic EPackage getAdditionalFeaturesPackage()
protected EPackage createAdditionalFeaturesPackage()
public EOperation resolveAdditionalOperation(EClassifier owner,
EOperation operation)
TypeResolverowner type.
resolveAdditionalOperation in interface TypeResolverowner - the type on which the additional operation is definedoperation - the additional operation
protected EOperation findMatchingOperation(EClass shadow,
EOperation operation)
shadow
class that matches the specified operation signature.
shadow - the shadow class to searchoperation - the operation to match
null if not found
protected EStructuralFeature findMatchingProperty(EClass shadow,
EStructuralFeature property)
shadow
class that matches the specified property signature.
shadow - the shadow class to searchproperty - the property to match
null if not found
public EStructuralFeature resolveAdditionalProperty(EClassifier owner,
EStructuralFeature property)
TypeResolverowner type.
resolveAdditionalProperty in interface TypeResolverowner - the type on which the additional property is definedproperty - the additional property
protected EClass createShadowClass(EClassifier type)
type.
type - an OCL type
protected EClass findShadowClass(EClassifier type)
type, if it already exists.
type - an OCL type
null
if not found
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||