public class SettingBehavior extends AbstractDelegatedBehavior<org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory>
AbstractDelegatedBehavior.ExpressionCacheAdapter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DERIVATION_CONSTRAINT_KEY |
static java.lang.String |
INITIAL_CONSTRAINT_KEY |
static SettingBehavior |
INSTANCE |
static java.lang.String |
NAME |
NO_OCL_DEFINITION
Constructor and Description |
---|
SettingBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
cacheOCLExpression(org.eclipse.emf.ecore.EStructuralFeature property,
OCLExpression e)
Creates an
OCLExpressionCacheAdapter for expression e and adds
it to property 's adapter list so that #getCachedOCLExpression(Notifier)
will return e when called for property . |
OCLExpression |
getCachedOCLExpression(org.eclipse.emf.ecore.EStructuralFeature property)
Looks for an
OCLExpressionCacheAdapter attached to property . |
org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory |
getDefaultFactory() |
org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry |
getDefaultRegistry() |
org.eclipse.emf.ecore.EPackage |
getEPackage(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) |
org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory |
getFactory(DelegateDomain delegateDomain,
org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) |
java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory> |
getFactoryClass() |
OCLExpression |
getFeatureBody(OCL ocl,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Return the feature body associated with structuralFeature, if necessary using ocl to
create the relevant parsing environment for a textual definition..
|
java.lang.String |
getName() |
java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry> |
getRegistryClass() |
boolean |
hasCompileableFeatureBody(org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Tells if there is a textual expression for the
structuralFeature in an
annotation that can be compiled by getFeatureBody(OCL, EStructuralFeature) . |
getDelegatedBehaviors, getDelegateDomains, getFactories, getFactory, isNoOCLDefinition, setDelegates, toString
public static final SettingBehavior INSTANCE
public static final java.lang.String DERIVATION_CONSTRAINT_KEY
public static final java.lang.String INITIAL_CONSTRAINT_KEY
public static final java.lang.String NAME
public void cacheOCLExpression(org.eclipse.emf.ecore.EStructuralFeature property, OCLExpression e)
OCLExpressionCacheAdapter
for expression e
and adds
it to property
's adapter list so that #getCachedOCLExpression(Notifier)
will return e
when called for property
. To achieve this, any other
OCLExpressionCacheAdapter
in property
'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.EStructuralFeature property)
OCLExpressionCacheAdapter
attached to property
.
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.EStructuralFeature.Internal.SettingDelegate.Factory getDefaultFactory()
public org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry getDefaultRegistry()
public org.eclipse.emf.ecore.EPackage getEPackage(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
public org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory getFactory(DelegateDomain delegateDomain, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
getFactory
in class AbstractDelegatedBehavior<org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory>
public java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory> getFactoryClass()
public OCLExpression getFeatureBody(OCL ocl, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
public java.lang.String getName()
public java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry> getRegistryClass()
public boolean hasCompileableFeatureBody(org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
structuralFeature
in an
annotation that can be compiled by getFeatureBody(OCL, EStructuralFeature)
. Probing
this saves callers the more expensive construction of an OCL
object.