public abstract class OperationFacadeLogic extends ModelElementFacadeLogicImpl implements OperationFacade
OperationFacade
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected org.omg.uml.foundation.core.Operation |
metaObject
The underlying UML object
|
contextRoot
Modifier | Constructor and Description |
---|---|
protected |
OperationFacadeLogic(org.omg.uml.foundation.core.Operation metaObjectIn,
String context)
Create Metafacade implementation instance using the MetafacadeFactory from the context
|
Modifier and Type | Method and Description |
---|---|
ParameterFacade |
findParameter(String name)
Finds the parameter on this operation having the given name, if no parameter is found, null
is returned instead.
|
Object |
findTaggedValue(String name,
boolean follow)
Searches the given feature for the specified tag.
|
String |
getArgumentNames()
A comma separated list of all argument names.
|
Collection<ParameterFacade> |
getArguments()
A behavioral feature of a classifier that specifies the name, type, parameters, and
constraints for
invoking an associated behavior.
|
String |
getArgumentTypeNames()
A comma separated list of all types of each argument, in order.
|
String |
getCall()
Constructs the operation call with the operation name
|
String |
getConcurrency()
Returns the concurrency modifier for this operation (i.e.
|
String |
getExceptionList()
A comma separated list containing all exceptions that this operation throws.
|
String |
getExceptionList(String initialExceptions)
Returns a comma separated list of exceptions appended to the comma separated list of fully
qualified 'initialException' classes passed in to this method.
|
Collection<ModelElementFacade> |
getExceptions()
A collection of all exceptions thrown by this operation.
|
String |
getGetterSetterReturnTypeName()
Return Type with multiplicity taken into account.
|
int |
getLower()
the lower value for the multiplicity
-only applicable for UML2
|
String |
getMethodBody()
Returns the operation method body determined from UML sequence diagrams or other UML sources.
|
OperationFacade |
getOverriddenOperation()
A behavioral feature of a classifier that specifies the name, type, parameters, and
constraints for
invoking an associated behavior.
|
ClassifierFacade |
getOwner()
The operations owned by this classifier.
|
Collection<ParameterFacade> |
getParameters()
If this parameter is located on an operation, this will represent that operation.
|
String |
getPostconditionName()
The name of the operation that handles postcondition constraints.
|
Collection<ConstraintFacade> |
getPostconditions()
A behavioral feature of a classifier that specifies the name, type, parameters, and
constraints for
invoking an associated behavior.
|
String |
getPreconditionCall()
The call to the precondition operation.
|
String |
getPreconditionName()
The name of the operation that handles precondition constraints.
|
Collection<ConstraintFacade> |
getPreconditions()
A behavioral feature of a classifier that specifies the name, type, parameters, and
constraints for
invoking an associated behavior.
|
String |
getPreconditionSignature()
The signature of the precondition operation.
|
ParameterFacade |
getReturnParameter()
(UML2 Only).
|
ClassifierFacade |
getReturnType()
A behavioral feature of a classifier that specifies the name, type, parameters, and
constraints for
invoking an associated behavior.
|
String |
getSignature()
Return the operation signature, including public/protested abstract returnType name plus
argument type and name
|
String |
getSignature(boolean withArgumentNames)
Returns the signature of the operation and optionally appends the argument names (if
withArgumentNames is true), otherwise returns the signature with just the types alone in the
signature.
|
String |
getSignature(String argumentModifier)
Returns the signature of the operation and optionally appends the given 'argumentModifier' to
each argument.
|
String |
getTypedArgumentList()
A comma-separated parameter list (type and name of each parameter) of an operation.
|
String |
getTypedArgumentList(String modifier)
A comma-separated parameter list (type and name of each parameter) of an operation with an
optional modifier (i.e final) before each parameter.
|
int |
getUpper()
the upper value for the multiplicity (will be -1 for *)
- only applicable for UML2
|
protected abstract ParameterFacade |
handleFindParameter(String name)
Method to be implemented in descendants
Finds the parameter on this operation having the given name, if no parameter is found, null
is returned instead.
|
protected abstract Object |
handleFindTaggedValue(String name,
boolean follow)
Method to be implemented in descendants
Searches the given feature for the specified tag.
|
protected abstract String |
handleGetArgumentNames() |
protected abstract Collection |
handleGetArguments()
UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract String |
handleGetArgumentTypeNames() |
protected abstract String |
handleGetCall() |
protected abstract String |
handleGetConcurrency() |
protected abstract String |
handleGetExceptionList() |
protected abstract String |
handleGetExceptionList(String initialExceptions)
Method to be implemented in descendants
Returns a comma separated list of exceptions appended to the comma separated list of fully
qualified 'initialException' classes passed in to this method.
|
protected abstract Collection<ModelElementFacade> |
handleGetExceptions() |
protected abstract String |
handleGetGetterSetterReturnTypeName() |
protected abstract int |
handleGetLower() |
protected abstract String |
handleGetMethodBody() |
protected abstract Object |
handleGetOverriddenOperation()
UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract Object |
handleGetOwner()
UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract Collection |
handleGetParameters()
UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract String |
handleGetPostconditionName() |
protected abstract Collection |
handleGetPostconditions()
UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract String |
handleGetPreconditionCall() |
protected abstract String |
handleGetPreconditionName() |
protected abstract Collection |
handleGetPreconditions()
UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract String |
handleGetPreconditionSignature() |
protected abstract ParameterFacade |
handleGetReturnParameter() |
protected abstract Object |
handleGetReturnType()
UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
|
protected abstract String |
handleGetSignature() |
protected abstract String |
handleGetSignature(boolean withArgumentNames)
Method to be implemented in descendants
Returns the signature of the operation and optionally appends the argument names (if
withArgumentNames is true), otherwise returns the signature with just the types alone in the
signature.
|
protected abstract String |
handleGetSignature(String argumentModifier)
Method to be implemented in descendants
Returns the signature of the operation and optionally appends the given 'argumentModifier' to
each argument.
|
protected abstract String |
handleGetTypedArgumentList() |
protected abstract String |
handleGetTypedArgumentList(String modifier)
Method to be implemented in descendants
A comma-separated parameter list (type and name of each parameter) of an operation with an
optional modifier (i.e final) before each parameter.
|
protected abstract int |
handleGetUpper() |
protected abstract boolean |
handleIsAbstract() |
protected abstract boolean |
handleIsExceptionsPresent() |
protected abstract boolean |
handleIsLeaf() |
protected abstract boolean |
handleIsMany() |
protected abstract boolean |
handleIsOrdered() |
protected abstract boolean |
handleIsOverriding() |
protected abstract boolean |
handleIsPostconditionsPresent() |
protected abstract boolean |
handleIsPreconditionsPresent() |
protected abstract boolean |
handleIsQuery() |
protected abstract boolean |
handleIsReturnTypePresent() |
protected abstract boolean |
handleIsStatic() |
protected abstract boolean |
handleIsUnique() |
boolean |
isAbstract()
True is the operation is abstract.
|
boolean |
isExceptionsPresent()
True if the operation has (i.e.
|
boolean |
isLeaf()
IsLeaf property in the operation.
|
boolean |
isMany()
UML2 only.
|
boolean |
isOperationFacadeMetaType() |
boolean |
isOrdered()
UML2 only: If isMany (Collection type returned), is the type unique within the collection.
|
boolean |
isOverriding()
True if this operation overrides an operation defined in an ancestor class.
|
boolean |
isPostconditionsPresent()
Whether any postcondition constraints are present on this operation.
|
boolean |
isPreconditionsPresent()
Whether any precondition constraints are present on this operation.
|
boolean |
isQuery()
Indicates whether or not this operation is a query operation.
|
boolean |
isReturnTypePresent()
True/false depending on whether or not the operation has a return type or not (i.e.
|
boolean |
isStatic()
True is the operation is static (only a single instance can be instantiated).
|
boolean |
isUnique()
UML2 only: for Collection return type, is the type unique within the collection.
|
void |
resetMetafacadeContext(String context)
Reset context only for non-root metafacades
|
void |
validateInvariants(Collection<ModelValidationMessage> validationMessages)
Constraint: org::andromda::metafacades::uml::OperationFacade::operation needs a return type
|
getArraySuffix, getValidationName, handleCopyTaggedValues, handleFindTaggedValue, handleFindTaggedValues, handleGetBindedFullyQualifiedName, handleGetConstraints, handleGetConstraints, handleGetDocumentation, handleGetDocumentation, handleGetDocumentation, handleGetFullyQualifiedName, handleGetFullyQualifiedName, handleGetFullyQualifiedNamePath, handleGetId, handleGetKeywords, handleGetLabel, handleGetLanguageMappings, handleGetModel, handleGetName, handleGetOwnedElements, handleGetPackage, handleGetPackageName, handleGetPackageName, handleGetPackagePath, handleGetQualifiedName, handleGetRootPackage, handleGetSourceDependencies, handleGetStateMachineContext, handleGetStereotypeNames, handleGetStereotypes, handleGetTaggedValues, handleGetTargetDependencies, handleGetTemplateParameter, handleGetTemplateParameters, handleGetVisibility, handleHasExactStereotype, handleHasKeyword, handleHasStereotype, handleIsBindingDependenciesPresent, handleIsConstraintsPresent, handleIsDocumentationPresent, handleIsReservedWord, handleIsTemplateParametersPresent, handleIsValidIdentifierName, handleTranslateConstraint, handleTranslateConstraints, handleTranslateConstraints
copyTaggedValues, findTaggedValue, findTaggedValues, getBindedFullyQualifiedName, getConstraints, getConstraints, getDocumentation, getDocumentation, getDocumentation, getFullyQualifiedName, getFullyQualifiedName, getFullyQualifiedNamePath, getId, getKeywords, getLabel, getLanguageMappings, getModel, getName, getPackage, getPackageName, getPackageName, getPackagePath, getQualifiedName, getRootPackage, getSourceDependencies, getStateMachineContext, getStereotypeNames, getStereotypes, getTaggedValues, getTargetDependencies, getTemplateParameter, getTemplateParameters, getVisibility, hasExactStereotype, hasKeyword, hasStereotype, isBindingDependenciesPresent, isConstraintsPresent, isDocumentationPresent, isModelElementFacadeMetaType, isReservedWord, isTemplateParametersPresent, isValidIdentifierName, toString, translateConstraint, translateConstraints, translateConstraints
compareTo, equals, getConfiguredProperty, getDebug, getMetafacadeContext, getMetaObject, getValidationOwner, hashCode, initialize, isConfiguredProperty, isMetafacadePropertyCachingEnabled, setMetafacadeContext, setProperty, shieldedElement, shieldedElements, THIS, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copyTaggedValues, findTaggedValue, findTaggedValues, getBindedFullyQualifiedName, getConstraints, getConstraints, getDocumentation, getDocumentation, getDocumentation, getFullyQualifiedName, getFullyQualifiedName, getFullyQualifiedNamePath, getId, getKeywords, getLabel, getLanguageMappings, getModel, getName, getPackage, getPackageName, getPackageName, getPackagePath, getQualifiedName, getRootPackage, getSourceDependencies, getStateMachineContext, getStereotypeNames, getStereotypes, getTaggedValues, getTargetDependencies, getTemplateParameter, getTemplateParameters, getValidationName, getValidationOwner, getVisibility, hasExactStereotype, hasKeyword, hasStereotype, initialize, isBindingDependenciesPresent, isConstraintsPresent, isDocumentationPresent, isModelElementFacadeMetaType, isReservedWord, isTemplateParametersPresent, isValidIdentifierName, translateConstraint, translateConstraints, translateConstraints
protected org.omg.uml.foundation.core.Operation metaObject
Operation
protected OperationFacadeLogic(org.omg.uml.foundation.core.Operation metaObjectIn, String context)
metaObjectIn
- context
- public void resetMetafacadeContext(String context)
resetMetafacadeContext
in class ModelElementFacadeLogic
context
- public boolean isOperationFacadeMetaType()
isOperationFacadeMetaType
in interface OperationFacade
OperationFacade
protected abstract String handleGetSignature()
OperationFacade.getSignature()
public final String getSignature()
getSignature
in interface OperationFacade
protected abstract String handleGetCall()
OperationFacade.getCall()
public final String getCall()
getCall
in interface OperationFacade
protected abstract String handleGetTypedArgumentList()
OperationFacade.getTypedArgumentList()
public final String getTypedArgumentList()
getTypedArgumentList
in interface OperationFacade
protected abstract boolean handleIsStatic()
OperationFacade.isStatic()
public final boolean isStatic()
isStatic
in interface OperationFacade
protected abstract boolean handleIsAbstract()
OperationFacade.isAbstract()
public final boolean isAbstract()
isAbstract
in interface OperationFacade
protected abstract String handleGetExceptionList()
OperationFacade.getExceptionList()
public final String getExceptionList()
getExceptionList
in interface OperationFacade
protected abstract Collection<ModelElementFacade> handleGetExceptions()
OperationFacade.getExceptions()
public final Collection<ModelElementFacade> getExceptions()
getExceptions
in interface OperationFacade
protected abstract boolean handleIsReturnTypePresent()
OperationFacade.isReturnTypePresent()
public final boolean isReturnTypePresent()
isReturnTypePresent
in interface OperationFacade
protected abstract boolean handleIsExceptionsPresent()
OperationFacade.isExceptionsPresent()
public final boolean isExceptionsPresent()
isExceptionsPresent
in interface OperationFacade
protected abstract String handleGetArgumentNames()
OperationFacade.getArgumentNames()
public final String getArgumentNames()
getArgumentNames
in interface OperationFacade
protected abstract String handleGetArgumentTypeNames()
OperationFacade.getArgumentTypeNames()
public final String getArgumentTypeNames()
getArgumentTypeNames
in interface OperationFacade
protected abstract boolean handleIsQuery()
OperationFacade.isQuery()
public final boolean isQuery()
isQuery
in interface OperationFacade
protected abstract String handleGetConcurrency()
OperationFacade.getConcurrency()
public final String getConcurrency()
getConcurrency
in interface OperationFacade
protected abstract String handleGetPreconditionName()
OperationFacade.getPreconditionName()
public final String getPreconditionName()
getPreconditionName
in interface OperationFacade
protected abstract String handleGetPostconditionName()
OperationFacade.getPostconditionName()
public final String getPostconditionName()
getPostconditionName
in interface OperationFacade
protected abstract String handleGetPreconditionSignature()
OperationFacade.getPreconditionSignature()
public final String getPreconditionSignature()
getPreconditionSignature
in interface OperationFacade
protected abstract String handleGetPreconditionCall()
OperationFacade.getPreconditionCall()
public final String getPreconditionCall()
getPreconditionCall
in interface OperationFacade
protected abstract boolean handleIsPreconditionsPresent()
OperationFacade.isPreconditionsPresent()
public final boolean isPreconditionsPresent()
isPreconditionsPresent
in interface OperationFacade
protected abstract boolean handleIsPostconditionsPresent()
OperationFacade.isPostconditionsPresent()
public final boolean isPostconditionsPresent()
isPostconditionsPresent
in interface OperationFacade
protected abstract int handleGetLower()
OperationFacade.getLower()
public final int getLower()
getLower
in interface OperationFacade
protected abstract int handleGetUpper()
OperationFacade.getUpper()
public final int getUpper()
getUpper
in interface OperationFacade
protected abstract ParameterFacade handleGetReturnParameter()
OperationFacade.getReturnParameter()
public final ParameterFacade getReturnParameter()
getReturnParameter
in interface OperationFacade
protected abstract boolean handleIsOverriding()
OperationFacade.isOverriding()
public final boolean isOverriding()
isOverriding
in interface OperationFacade
protected abstract boolean handleIsOrdered()
OperationFacade.isOrdered()
public final boolean isOrdered()
isOrdered
in interface OperationFacade
protected abstract String handleGetGetterSetterReturnTypeName()
OperationFacade.getGetterSetterReturnTypeName()
public final String getGetterSetterReturnTypeName()
getGetterSetterReturnTypeName
in interface OperationFacade
protected abstract boolean handleIsMany()
OperationFacade.isMany()
public final boolean isMany()
isMany
in interface OperationFacade
protected abstract boolean handleIsUnique()
OperationFacade.isUnique()
public final boolean isUnique()
isUnique
in interface OperationFacade
protected abstract boolean handleIsLeaf()
OperationFacade.isLeaf()
public final boolean isLeaf()
isLeaf
in interface OperationFacade
protected abstract String handleGetMethodBody()
OperationFacade.getMethodBody()
public final String getMethodBody()
getMethodBody
in interface OperationFacade
protected abstract Object handleFindTaggedValue(String name, boolean follow)
name
- follow
- public Object findTaggedValue(String name, boolean follow)
findTaggedValue
in interface OperationFacade
name
- String
The name of the tagged value to find.follow
- boolean
TODO: Model Documentation for
OperationFacade.findTaggedValue(follow)protected abstract String handleGetExceptionList(String initialExceptions)
initialExceptions
- public String getExceptionList(String initialExceptions)
getExceptionList
in interface OperationFacade
initialExceptions
- String
A comma separated list of fully qualified 'initialException' classes passed in to this
method.protected abstract String handleGetSignature(boolean withArgumentNames)
withArgumentNames
- public String getSignature(boolean withArgumentNames)
getSignature
in interface OperationFacade
withArgumentNames
- boolean
TODO: Model Documentation for
OperationFacade.getSignature(withArgumentNames)protected abstract String handleGetTypedArgumentList(String modifier)
modifier
- public String getTypedArgumentList(String modifier)
getTypedArgumentList
in interface OperationFacade
modifier
- String
The modifier to prefix the arguments with (i.e. 'final')protected abstract String handleGetSignature(String argumentModifier)
argumentModifier
- public String getSignature(String argumentModifier)
getSignature
in interface OperationFacade
argumentModifier
- String
The modifier to give the arguments (i.e. 'final').protected abstract ParameterFacade handleFindParameter(String name)
name
- public ParameterFacade findParameter(String name)
findParameter
in interface OperationFacade
name
- String
The name of the parameter to find on the owner operation.public final Collection<ConstraintFacade> getPostconditions()
getPostconditions
in interface OperationFacade
protected abstract Collection handleGetPostconditions()
public final Collection<ParameterFacade> getArguments()
getArguments
in interface OperationFacade
protected abstract Collection handleGetArguments()
public final ClassifierFacade getOwner()
getOwner
in interface OperationFacade
protected abstract Object handleGetOwner()
handleGetOwner
in class ModelElementFacadeLogicImpl
ModelElementFacade.getPackage()
public final Collection<ParameterFacade> getParameters()
getParameters
in interface OperationFacade
protected abstract Collection handleGetParameters()
public final ClassifierFacade getReturnType()
getReturnType
in interface OperationFacade
protected abstract Object handleGetReturnType()
public final Collection<ConstraintFacade> getPreconditions()
getPreconditions
in interface OperationFacade
protected abstract Collection handleGetPreconditions()
public final OperationFacade getOverriddenOperation()
getOverriddenOperation
in interface OperationFacade
protected abstract Object handleGetOverriddenOperation()
public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
Constraint: org::andromda::metafacades::uml::OperationFacade::operation needs a return type
Error: Each operation needs a return type, you cannot leave the type unspecified, even if you want void you'll need to explicitly specify it.
OCL: context OperationFacade inv: returnType.name->notEmpty()
Constraint: org::andromda::metafacades::uml::OperationFacade::operation must have a name
Error: Each operation must have a non-empty name.
OCL: context OperationFacade inv: name -> notEmpty()
Constraint: org::andromda::metafacades::uml::OperationFacade::primitive operation return cannot be used in a Collection
Error: Primitive return parameters cannot be used in Collections (multiplicity > 1). Use the wrapped type or Array type instead.
OCL: context OperationFacade inv: returnParameter.type.primitive implies (many = false)
Constraint: org::andromda::metafacades::uml::OperationFacade::wrapped primitive operation return should not be required
Error: Wrapped primitive operation return must have a multiplicity lower bound = 0 (must be optional). Use the unwrapped type, or change the multiplicity.
OCL: context OperationFacade inv: returnParameter.type.wrappedPrimitive and many = false implies (lower = 0)
Constraint: org::andromda::metafacades::uml::OperationFacade::primitive operation return must be required
Error: Primitive operation return types must have a multiplicity lower bound > 0 (must be required). Use a wrapped type, or change the multiplicity.
OCL: context OperationFacade inv: returnParameter.type.primitive implies (lower > 0)
Constraint: org::andromda::metafacades::uml::OperationFacade::operation multiplicity must match return parameter multiplicity
Error: Operation return parameter with multiplicity greater than 1 must match the operation multiplicity greater than 1.
OCL: context OperationFacade inv: many implies (returnParameter.many)
validateInvariants
in interface ModelElementFacade
validateInvariants
in class ModelElementFacadeLogic
validationMessages
- CollectionModelElementFacadeLogic.validateInvariants(Collection validationMessages)
Copyright © 2003–2014 AndroMDA.org. All rights reserved.