org.eclipse.ocl.ecore.delegate
Class SettingBehavior
java.lang.Object
org.eclipse.ocl.ecore.delegate.AbstractDelegatedBehavior<org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory>
org.eclipse.ocl.ecore.delegate.SettingBehavior
- All Implemented Interfaces:
- DelegatedBehavior<org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry,org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory>
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>
- Since:
- 3.0
|
Method Summary |
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). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INSTANCE
public static final SettingBehavior INSTANCE
DERIVATION_CONSTRAINT_KEY
public static final java.lang.String DERIVATION_CONSTRAINT_KEY
- See Also:
- Constant Field Values
INITIAL_CONSTRAINT_KEY
public static final java.lang.String INITIAL_CONSTRAINT_KEY
- See Also:
- Constant Field Values
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
SettingBehavior
public SettingBehavior()
cacheOCLExpression
public 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. To achieve this, any other
OCLExpressionCacheAdapter in property's adapter list is removed.
- Parameters:
e - if null, any existing cache entry is removed and no new entry
is created. #getCachedOCLExpression(Notifier) will then return null.- Since:
- 3.1
getCachedOCLExpression
public OCLExpression getCachedOCLExpression(org.eclipse.emf.ecore.EStructuralFeature property)
- Looks for an
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.
- Since:
- 3.1
getDefaultFactory
public org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory getDefaultFactory()
getDefaultRegistry
public org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry getDefaultRegistry()
getEPackage
public org.eclipse.emf.ecore.EPackage getEPackage(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
getFactory
public org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory getFactory(DelegateDomain delegateDomain,
org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
- Specified by:
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>
getFactoryClass
public java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory> getFactoryClass()
getFeatureBody
public 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..
getName
public java.lang.String getName()
getRegistryClass
public java.lang.Class<org.eclipse.emf.ecore.EStructuralFeature.Internal.SettingDelegate.Factory.Registry> getRegistryClass()
hasCompileableFeatureBody
public 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). Probing
this saves callers the more expensive construction of an OCL object.
- Since:
- 3.1