public class InvocationBehavior extends AbstractDelegatedBehavior<org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry,org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory>
AbstractDelegatedBehavior.ExpressionCacheAdapter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BODY_CONSTRAINT_KEY |
static InvocationBehavior |
INSTANCE |
static java.lang.String |
NAME |
NO_OCL_DEFINITION
Constructor and Description |
---|
InvocationBehavior() |
Modifier and Type | Method and Description |
---|---|
boolean |
appliesTo(org.eclipse.emf.ecore.EOperation operation) |
void |
cacheOCLExpression(org.eclipse.emf.ecore.EOperation operation,
OCLExpression e)
Creates an
OCLExpressionCacheAdapter for expression e and adds
it to operation 's adapter list so that #getCachedOCLExpression(Notifier)
will return e when called for operation . |
OCLExpression |
getCachedOCLExpression(org.eclipse.emf.ecore.EOperation operation)
Looks for an
OCLExpressionCacheAdapter attached to operation . |
org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory |
getDefaultFactory() |
org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry |
getDefaultRegistry() |
org.eclipse.emf.ecore.EPackage |
getEPackage(org.eclipse.emf.ecore.EOperation eOperation) |
org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory |
getFactory(DelegateDomain delegateDomain,
org.eclipse.emf.ecore.EOperation eOperation) |
java.lang.Class<org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory> |
getFactoryClass() |
java.lang.String |
getName() |
OCLExpression |
getOperationBody(OCL ocl,
org.eclipse.emf.ecore.EOperation operation)
Return the operation body associated with operation, if necessary using
ocl to create the relevant parsing environment for a textual
definition. |
java.lang.Class<org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry> |
getRegistryClass() |
boolean |
hasCompileableOperationBody(org.eclipse.emf.ecore.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 java.lang.String BODY_CONSTRAINT_KEY
public static final java.lang.String NAME
public boolean appliesTo(org.eclipse.emf.ecore.EOperation operation)
public void cacheOCLExpression(org.eclipse.emf.ecore.EOperation operation, OCLExpression e)
OCLExpressionCacheAdapter
for expression e
and adds
it to operation
's adapter list so that #getCachedOCLExpression(Notifier)
will return e
when called for operation
. To achieve this, any other
OCLExpressionCacheAdapter
in operation
's adapter list is removed.e
- if null
, any existing cache entry is removed and no new entry
is created. #getCachedOCLExpression(Notifier)
will then return null
.public OCLExpression getCachedOCLExpression(org.eclipse.emf.ecore.EOperation operation)
OCLExpressionCacheAdapter
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 org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory getDefaultFactory()
public org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry getDefaultRegistry()
public org.eclipse.emf.ecore.EPackage getEPackage(org.eclipse.emf.ecore.EOperation eOperation)
public org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory getFactory(DelegateDomain delegateDomain, org.eclipse.emf.ecore.EOperation eOperation)
getFactory
in class AbstractDelegatedBehavior<org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry,org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory>
public java.lang.Class<org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory> getFactoryClass()
public java.lang.String getName()
public OCLExpression getOperationBody(OCL ocl, org.eclipse.emf.ecore.EOperation operation)
ocl
to create the relevant parsing environment for a textual
definition.public java.lang.Class<org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate.Factory.Registry> getRegistryClass()
public boolean hasCompileableOperationBody(org.eclipse.emf.ecore.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.