protected static class AbstractDelegatedBehavior.ExpressionCacheAdapter
extends org.eclipse.emf.common.notify.impl.AdapterImpl
"modifying" the object to which the adapter gets attached.| Constructor and Description |
|---|
AbstractDelegatedBehavior.ExpressionCacheAdapter(OCLExpression expression) |
| Modifier and Type | Method and Description |
|---|---|
static void |
cacheOCLExpression(org.eclipse.emf.ecore.EModelElement modelElement,
OCLExpression e)
Creates an
OCLExpressionCacheAdapter for expression e and adds
it to modelElement's adapter list so that #getCachedOCLExpression(Notifier)
will return e when called for modelElement. |
static OCLExpression |
getCachedOCLExpression(org.eclipse.emf.ecore.EModelElement modelElement)
Looks for an
OCLExpressionCacheAdapter attached to modelElement. |
OCLExpression |
getExpression() |
boolean |
isAdapterForType(java.lang.Object type) |
public AbstractDelegatedBehavior.ExpressionCacheAdapter(OCLExpression expression)
public static void cacheOCLExpression(org.eclipse.emf.ecore.EModelElement modelElement,
OCLExpression e)
OCLExpressionCacheAdapter for expression e and adds
it to modelElement's adapter list so that #getCachedOCLExpression(Notifier)
will return e when called for modelElement. To achieve this, any other
OCLExpressionCacheAdapter in modelElement'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 static OCLExpression getCachedOCLExpression(org.eclipse.emf.ecore.EModelElement modelElement)
OCLExpressionCacheAdapter attached to modelElement.
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 OCLExpression getExpression()
public boolean isAdapterForType(java.lang.Object type)
isAdapterForType in interface org.eclipse.emf.common.notify.AdapterisAdapterForType in class org.eclipse.emf.common.notify.impl.AdapterImpl