public interface UMLReflection<PK,C,O,P,EL,PM,S,COA,SSA,CT>
See the Environment class for a description of the
generic type parameters of this interface.
| Modifier and Type | Field and Description |
|---|---|
static String |
BODY
Stereotype applied to operation body conditions.
|
static String |
DEFINITION
Stereotype applied definition expressions.
|
static String |
DERIVATION
Stereotype applied derived value expressions.
|
static String |
INITIAL
Stereotype applied initial value expressions.
|
static String |
INVARIANT
Stereotype applied to classifier invariant constraints.
|
static String |
OCL_HELPER
Stereotype applied to herlp attributes and operations defined by
definition constraints.
|
static String |
POSTCONDITION
Stereotype applied to operation postcondition constraints.
|
static String |
PRECONDITION
Stereotype applied to operation precondition constraints.
|
static int |
RELATED_TYPE
Mask for testing the result of the
getRelationship(C, C) method, to
check whether the first classifier is related by generalization to the
second classifier (being either a supertype or a subtype of it, including
possibly the same type). |
static int |
SAME_TYPE
Result of
getRelationship(C, C) indicating that two classifiers are,
in fact, the same type. |
static int |
STRICT_SUBTYPE
Result of
getRelationship(C, C) indicating that the first classifier
is a strict subtype of the second. |
static int |
STRICT_SUPERTYPE
Result of
getRelationship(C, C) indicating that the first classifier
is a strict supertype of the second. |
static int |
SUBTYPE
Mask for testing the result of the
getRelationship(C, C) method, to
check whether the first classifier is the same type as or a
strict subtype of the second. |
static int |
SUPERTYPE
Mask for testing the result of the
getRelationship(C, C) method, to
check whether the first classifier is the same type as or a
strict supertype of the second. |
static int |
UNRELATED_TYPE
Result of
getRelationship(C, C) indicating that the first classifier
is not related by generalization to the second classifier (being
different from it and neither a subtype nor a supertype). |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstrainedElement(CT constraint,
EObject constrainedElement)
Adds a constrainedElement to a constraint.
|
C |
asOCLType(C modelType)
Obtains the OCL type corresponding to the specified type from the
environment's type system.
|
COA |
createCallOperationAction(O operation)
Creates a CallOperationAction referencing the specified
operation.
|
CT |
createConstraint()
Creates a Constraint.
|
ExpressionInOCL<C,PM> |
createExpressionInOCL()
Creates an ExpressionInOCL.
|
O |
createOperation(String name,
C resultType,
List<String> paramNames,
List<C> paramTypes)
Creates a new Operation.
|
P |
createProperty(String name,
C resultType)
Creates a new Property.
|
SSA |
createSendSignalAction(C signal)
Creates a SendSignalAction referencing the specified
signal.
|
Collection<? extends C> |
getAllSupertypes(C classifier)
Obtains all of the classifiers that generalize the specified classifier.
|
C |
getAssociationClass(P property)
Obtains the association class of which the specified property
is an end, if any.
|
List<P> |
getAttributes(C classifier)
Obtains all of the attributes defined by and inherited by the specified
classifier.
|
List<C> |
getClassifiers(PK pkg)
Obtains the classifiers contained directly within the specified package.
|
C |
getCommonSuperType(C type1,
C type2)
Obtains the least common general classifier of two classifiers, if they
have any in common.
|
List<? extends EObject> |
getConstrainedElements(CT constraint)
Obtains the list of element constraint by a constraint, as a list of
EObjects. |
CT |
getConstraint(ExpressionInOCL<C,PM> specification)
Obtains the constraint owning the given specification, if any.
|
String |
getConstraintName(CT constraint)
Obtains the name of a constraint.
|
String |
getDescription(Object namedElement)
Obtains the user-presentable description of an element.
|
C |
getEnumeration(EL enumerationLiteral)
Obtains the enumeration declaring the specified literal.
|
EL |
getEnumerationLiteral(C enumerationType,
String literalName)
Obtains the named literal of an enumeration.
|
List<EL> |
getEnumerationLiterals(C enumerationType)
Obtains the literals declared by the specified enumeration type.
|
List<P> |
getMemberEnds(C associationClass)
Obtains the ends of the specified association class as a list of
properties.
|
String |
getName(Object namedElement)
Obtains the name of an element, if it is a named element.
|
List<PK> |
getNestedPackages(PK pkg)
Obtains the packages nested within the specified nesting package, if
any.
|
PK |
getNestingPackage(PK pkg)
Obtains the parent package (or nearest parent package), if any, of the
specified package.
|
C |
getOCLType(Object metaElement)
Obtains the type of a meta-element (classifier, operation, property,
parameter, etc.).
|
O |
getOperation(COA callOperationAction)
Obtains the called operation referenced by the specified call action.
|
List<O> |
getOperations(C classifier)
Obtains all of the operations defined by and inherited by the specified
classifier.
|
C |
getOwningClassifier(Object feature)
Obtains the classifier that declares the specified feature.
|
PK |
getPackage(C classifier)
Obtains the package containing (or nearest package of) the specified
classifier.
|
List<PM> |
getParameters(O operation)
Obtains the formal parameters (excluding return parameters) of an
operation.
|
String |
getQualifiedName(Object namedElement)
Obtains the qualified name of an element ("::"-separated), if it is a
named element.
|
List<P> |
getQualifiers(P property)
Gets the qualifiers of a property representing a UML association end.
|
int |
getRelationship(C type1,
C type2)
Obtains the relationship (according to generalization) between two
classifiers in the user model.
|
C |
getSignal(SSA sendSignalAction)
Obtains the sent signal referenced by the specified send action.
|
List<C> |
getSignals(C owner)
Retrieves a list of all signal receptions defined by the specified
owner classifier. |
ExpressionInOCL<C,PM> |
getSpecification(CT constraint)
Obtains the specification of a constraint, if it is an
ExpressionInOCL.
|
String |
getStereotype(CT constraint)
Obtains the stereotype (one of the constants defined by this interface)
that identifies the kind of the specified constraint.
|
Object |
getStereotypeApplication(Object baseElement,
C stereotype)
Obtains the application (stereotype instance) of the specified stereotype
applied to the given base element, if the stereotype is indeed applied.
|
boolean |
isAssociationClass(C type)
Determines whether the specified
type is an association
class. |
boolean |
isClass(Object metaElement)
Queries whether the specified model element is a class.
|
boolean |
isClassifier(Object metaElement)
Queries whether the specified model element is a classifier.
|
boolean |
isComparable(C type)
Queries whether the specified type is a comparable (fully ordered)
data type.
|
boolean |
isConstraint(Object metaElement)
Queries whether the specified model element is a constraint.
|
boolean |
isDataType(Object metaElement)
Queries whether the specified model element is a data type.
|
boolean |
isEnumeration(C type)
Queries whether the specified classifier is an enumeration.
|
boolean |
isMany(Object metaElement)
Queries whether the specified meta-element (already known to be a
property, parameter, or operation) has multiplicity many.
|
boolean |
isOperation(Object metaElement)
Queries whether the specified model element is an operation.
|
boolean |
isPackage(Object metaElement)
Queries whether the specified model element is a package.
|
boolean |
isProperty(Object metaElement)
Queries whether the specified model element is a property.
|
boolean |
isQuery(O operation)
Determines whether the specified
operation is a query
operation. |
boolean |
isStatic(Object feature)
Queries whether a property or operation is static (applies to a classifier
rather than to its instances).
|
boolean |
isStereotype(C type)
Queries whether the specified model element is a stereotype.
|
void |
setConstraintName(CT constraint,
String name)
Sets the name of a constraint.
|
boolean |
setIsStatic(Object feature,
boolean isStatic)
Sets a property or operation static (applies to a classifier
rather than to its instances).
|
void |
setName(TypedElement<C> element,
String name)
Sets the name of the specified typed element.
|
void |
setSpecification(CT constraint,
ExpressionInOCL<C,PM> specification)
Sets the specification of a constraint.
|
void |
setStereotype(CT constraint,
String stereotype)
Sets the stereotype (one of the constants defined by this interface)
that identifies the kind of the specified constraint.
|
void |
setType(TypedElement<C> element,
C type)
Sets the type of the specified typed element.
|
static final String INVARIANT
getStereotype(CT),
Constant Field Valuesstatic final String PRECONDITION
getStereotype(CT),
Constant Field Valuesstatic final String POSTCONDITION
getStereotype(CT),
Constant Field Valuesstatic final String BODY
getStereotype(CT),
Constant Field Valuesstatic final String DEFINITION
getStereotype(CT),
Constant Field Valuesstatic final String INITIAL
getStereotype(CT),
Constant Field Valuesstatic final String DERIVATION
getStereotype(CT),
Constant Field Valuesstatic final String OCL_HELPER
static final int SAME_TYPE
getRelationship(C, C) indicating that two classifiers are,
in fact, the same type.static final int STRICT_SUBTYPE
getRelationship(C, C) indicating that the first classifier
is a strict subtype of the second.static final int SUBTYPE
getRelationship(C, C) method, to
check whether the first classifier is the same type as or a
strict subtype of the second.static final int STRICT_SUPERTYPE
getRelationship(C, C) indicating that the first classifier
is a strict supertype of the second.static final int SUPERTYPE
getRelationship(C, C) method, to
check whether the first classifier is the same type as or a
strict supertype of the second.static final int RELATED_TYPE
getRelationship(C, C) method, to
check whether the first classifier is related by generalization to the
second classifier (being either a supertype or a subtype of it, including
possibly the same type).static final int UNRELATED_TYPE
getRelationship(C, C) indicating that the first classifier
is not related by generalization to the second classifier (being
different from it and neither a subtype nor a supertype).C getOCLType(Object metaElement)
metaElement - an element of the environment's metamodelisMany(Object)Collection<? extends C> getAllSupertypes(C classifier)
classifier - a classifierboolean isMany(Object metaElement)
metaElement - a property, parameter, or operationC asOCLType(C modelType)
modelType - a type in the environmentPK getNestingPackage(PK pkg)
pkg - a packagenull if the given
package has no nesting packagegetNestedPackages(PK)List<PK> getNestedPackages(PK pkg)
pkg - a packagegetNestingPackage(PK)PK getPackage(C classifier)
classifier - a classifier in the modelnull if there
is noneList<C> getClassifiers(PK pkg)
pkg - a package in the modelC getOwningClassifier(Object feature)
feature - an operation or propertynull)List<C> getSignals(C owner)
owner classifier. This must include also signals
defined by supertypes of the owner. This method is used for content-assist.owner - the owner type of the signal receptionsEClasses), or an empty list if noneO createOperation(String name, C resultType, List<String> paramNames, List<C> paramTypes)
Note that the new operation must be a query operation, as OCL can only define queries.
name - the name of the new operation (must not be null)resultType - the result type of the operation (not null)paramNames - the names of the formal parameters of the operaiton
(may be an empty list if no parameters)paramTypes - the parameter types, corresponding one-for-one with
the parameter namesisQuery(Object)List<PM> getParameters(O operation)
operation - an operation in the modelList<O> getOperations(C classifier)
classifier - a classifier in the modelP createProperty(String name, C resultType)
name - the name of the new property (must not be null)resultType - the type of the property (not null)List<P> getAttributes(C classifier)
classifier - a classifier in the modelboolean isQuery(O operation)
operation is a query
operation. Query operations are guaranteed not to alter the system; by
the nature of the OCL, all queries defined by OCL are queries.operation - an operationboolean isStatic(Object feature)
feature - an operation or a propertyboolean setIsStatic(Object feature, boolean isStatic)
feature - an operation or a propertyisStatic - whether it is to be staticList<P> getQualifiers(P property)
property - a property of the model classboolean isAssociationClass(C type)
type is an association
class.type - a classifier in the modelC getAssociationClass(P property)
property - a propertynull if the property
is not an end of an association classList<P> getMemberEnds(C associationClass)
isAssociationClass(C) method.associationClass - a classifier representing an association classisAssociationClass(C)boolean isOperation(Object metaElement)
metaElement - a model elementboolean isPackage(Object metaElement)
metaElement - a model elementboolean isProperty(Object metaElement)
metaElement - a model elementboolean isClassifier(Object metaElement)
metaElement - a model elementboolean isClass(Object metaElement)
metaElement - a model elementboolean isConstraint(Object metaElement)
metaElement - a model elementboolean isDataType(Object metaElement)
metaElement - a model elementboolean isStereotype(C type)
type - a type in the modelObject getStereotypeApplication(Object baseElement, C stereotype)
baseElement - a model elementstereotype - a stereotype applied to the elementnull if the stereotype is not appliedboolean isEnumeration(C type)
type - a type in the modelC getEnumeration(EL enumerationLiteral)
enumerationLiteral - an enumeration literalnull)List<EL> getEnumerationLiterals(C enumerationType)
enumeration.enumerationType - an enumerationEL getEnumerationLiteral(C enumerationType, String literalName)
enumeration.enumerationType - an enumerationliteralName - the name of a literalnull if the
specified name does not match an existing literalboolean isComparable(C type)
type - a type in the modelCOA createCallOperationAction(O operation)
operation - the operation that is calledO getOperation(COA callOperationAction)
callOperationAction - an operation-call actionnull)SSA createSendSignalAction(C signal)
signal - the signal that is sendC getSignal(SSA sendSignalAction)
sendSignalAction - a signal-send actionnull)CT createConstraint()
String getStereotype(CT constraint)
constraint - a constraintnull)void setStereotype(CT constraint, String stereotype)
constraint - a constraintstereotype - its stereotype (must not be null)String getConstraintName(CT constraint)
constraint - a constraintvoid setConstraintName(CT constraint, String name)
constraint - a constraintname - the constraint nameExpressionInOCL<C,PM> createExpressionInOCL()
ExpressionInOCL<C,PM> getSpecification(CT constraint)
constraint - a constraintnull
if it has none or it is not an ExpressionInOCLvoid setSpecification(CT constraint, ExpressionInOCL<C,PM> specification)
constraint - a constraintspecification - its specificationCT getConstraint(ExpressionInOCL<C,PM> specification)
specification - a constraint specificationnull if noneList<? extends EObject> getConstrainedElements(CT constraint)
EObjects. This list is modifiable, but only after an unsafe cast to
establish a lower type bound. Therefore the addConstrainedElement(CT, EObject) method
should be used instead.constraint - a constraintvoid addConstrainedElement(CT constraint, EObject constrainedElement)
constraint - the constraint to receiveconstrainedElement - the constrained elementString getName(Object namedElement)
namedElement - a named elementnull if it is not
a named elementString getQualifiedName(Object namedElement)
namedElement - a named elementnull if
it is not a named elementString getDescription(Object namedElement)
Choices.namedElement - a named elementC getCommonSuperType(C type1, C type2)
type1 - a classifier in the modeltype2 - another classifier in the modelnull if none.
This result (if any) must be a type in the user model; an
implementation must not return OclAny in the case that
there is no common supertypeint getRelationship(C type1, C type2)
type1 - a classifier in the modeltype2 - another classifier in the modelvoid setName(TypedElement<C> element, String name)
element - a typed elementname - the type element's nameTypedElement.getName()void setType(TypedElement<C> element, C type)
element - a typed elementtype - the type element's typeTypedElement.getType()Copyright © 2015 Open eHealth Foundation. All rights reserved.