|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
org.eclipse.ocl.uml.TypeResolverImpl
public class TypeResolverImpl
UML implementation of the TypeResolver
interface.
Field Summary |
---|
Fields inherited from class org.eclipse.ocl.AbstractTypeResolver |
---|
ADDITIONS_PACKAGE, COLLECTIONS_PACKAGE, MESSAGES_PACKAGE, TUPLES_PACKAGE, TYPES_PACKAGE |
Constructor Summary | |
---|---|
TypeResolverImpl(UMLEnvironment env)
Initializes me with an Environment . |
|
TypeResolverImpl(UMLEnvironment env,
Resource resource)
Initializes me with a resource in which I will persist the model-based types that I generate in my associated Environment . |
Method Summary | |
---|---|
protected void |
addClassifier(java.lang.Package pkg,
Classifier classifier)
Adds a classifier to the specified package, which is one that I use to store OCL-generated types. |
protected void |
addOperation(Classifier owner,
Operation operation)
Adds the specified operation to a classifier. |
protected void |
addProperty(Classifier owner,
Property property)
Adds the specified property to a classifier. |
protected java.lang.Package |
createPackage(java.lang.String name)
Creates a package with the specified name. |
protected Resource |
createResource()
Creates the resource that persists my generated types. |
protected java.lang.Class |
createShadowClass(Classifier type)
Creates the shadow class to contain additional features defined for the specified OCL type . |
protected java.lang.Package |
findPackage(java.lang.String name)
Finds the existing package with the specified name in my resource. |
protected Classifier |
getShadowedClassifier(Classifier shadow)
Obtains the classifier for which the specified shadow stores additional features. |
CollectionType<Classifier,Operation> |
resolveCollectionType(CollectionKind kind,
Classifier elementType)
Resolves the collection type of the specified kind and
element type, either created anew or previously created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeResolverImpl(UMLEnvironment env)
Environment
.
env
- my environmentpublic TypeResolverImpl(UMLEnvironment env, Resource resource)
Environment
.
resource
- my resourceMethod Detail |
---|
protected Resource createResource()
AbstractTypeResolver
createResource
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
protected java.lang.Package createPackage(java.lang.String name)
AbstractTypeResolver
createPackage
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
name
- the package name
protected java.lang.Package findPackage(java.lang.String name)
AbstractTypeResolver
findPackage
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
name
- the package to seek
null
if noneprotected void addClassifier(java.lang.Package pkg, Classifier classifier)
AbstractTypeResolver
addClassifier
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
pkg
- one of my packagesclassifier
- a classifier to add to itprotected void addOperation(Classifier owner, Operation operation)
AbstractTypeResolver
addOperation
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
owner
- the classifier to own the operationoperation
- the operation to add to the classifierprotected void addProperty(Classifier owner, Property property)
AbstractTypeResolver
addProperty
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
owner
- the classifier to own the propertyproperty
- the property to add to the classifierprotected java.lang.Class createShadowClass(Classifier type)
AbstractTypeResolver
type
.
createShadowClass
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
type
- an OCL type
protected Classifier getShadowedClassifier(Classifier shadow)
AbstractTypeResolver
getShadowedClassifier
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
shadow
- a class originally created to shadow a model classifier
AbstractTypeResolver.createShadowClass(Object)
,
AbstractTypeResolver.getShadowClass(Object)
public CollectionType<Classifier,Operation> resolveCollectionType(CollectionKind kind, Classifier elementType)
TypeResolver
kind
and
element type, either created anew or previously created.
resolveCollectionType
in interface TypeResolver<Classifier,Operation,Property>
resolveCollectionType
in class AbstractTypeResolver<java.lang.Package,Classifier,Operation,Property,Parameter>
kind
- the kind of collection type to createelementType
- the element type
|
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 |