public class InvocationBehavior extends AbstractDelegatedBehavior<EOperation,InvocationDelegate.Factory.Registry,InvocationDelegate.Factory>
Modifier and Type | Field and Description |
---|---|
static String |
BODY_CONSTRAINT_KEY |
static InvocationBehavior |
INSTANCE |
static String |
NAME |
NO_OCL_DEFINITION
Constructor and Description |
---|
InvocationBehavior() |
Modifier and Type | Method and Description |
---|---|
boolean |
appliesTo(EOperation operation) |
void |
cacheOCLExpression(EOperation operation,
OCLExpression e)
Creates an
ExpressionCacheAdapter for expression e and adds
it to operation 's adapter list so that getCachedOCLExpression(EOperation)
will return e when called for operation . |
OCLExpression |
getCachedOCLExpression(EOperation operation)
Looks for an
ExpressionCacheAdapter attached to operation . |
InvocationDelegate.Factory |
getDefaultFactory() |
InvocationDelegate.Factory.Registry |
getDefaultRegistry() |
EPackage |
getEPackage(EOperation eOperation) |
InvocationDelegate.Factory |
getFactory(DelegateDomain delegateDomain,
EOperation eOperation) |
Class<InvocationDelegate.Factory> |
getFactoryClass() |
String |
getName() |
OCLExpression |
getOperationBody(OCL ocl,
EOperation operation)
Return the operation body associated with operation, if necessary using
ocl to create the relevant parsing environment for a textual
definition. |
Class<InvocationDelegate.Factory.Registry> |
getRegistryClass() |
boolean |
hasCompileableOperationBody(EOperation operation)
Tells if there is a textual expression for the
operation in an
annotation that can be compiled by getOperationBody(OCL, EOperation) . |
getDelegatedBehaviors, getDelegateDomains, getFactories, getFactory, isNoOCLDefinition, setDelegates, toString
public static final InvocationBehavior INSTANCE
public static final String BODY_CONSTRAINT_KEY
public static final String NAME
public boolean appliesTo(EOperation operation)
public void cacheOCLExpression(EOperation operation, OCLExpression e)
ExpressionCacheAdapter
for expression e
and adds
it to operation
's adapter list so that getCachedOCLExpression(EOperation)
will return e
when called for operation
. To achieve this, any other
ExpressionCacheAdapter
in operation
's adapter list is removed.e
- if null
, any existing cache entry is removed and no new entry
is created. getCachedOCLExpression(EOperation)
will then return null
.public OCLExpression getCachedOCLExpression(EOperation operation)
ExpressionCacheAdapter
attached to operation
.
If such an adapter is found, its cached expression is returned. The cached expression
may be a reserved expression indicating that no OCL expression exists and that an
unsuccessful attempt to obtain one has been made before.
AbstractDelegatedBehavior.isNoOCLDefinition(OCLExpression)
should be used to check for the reserved expression.
null is returned if no cached expression is available.public InvocationDelegate.Factory getDefaultFactory()
public InvocationDelegate.Factory.Registry getDefaultRegistry()
public EPackage getEPackage(EOperation eOperation)
public InvocationDelegate.Factory getFactory(DelegateDomain delegateDomain, EOperation eOperation)
public Class<InvocationDelegate.Factory> getFactoryClass()
public String getName()
public OCLExpression getOperationBody(OCL ocl, EOperation operation)
ocl
to create the relevant parsing environment for a textual
definition.public Class<InvocationDelegate.Factory.Registry> getRegistryClass()
public boolean hasCompileableOperationBody(EOperation operation)
operation
in an
annotation that can be compiled by getOperationBody(OCL, EOperation)
. Probing
this saves callers the more expensive construction of an OCL
object.Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.