Package com.nomagic.uml2.ext.jmi.reflect
Class ExpressionEvaluationManager
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.reflect.ExpressionEvaluationManager
-
@ThreadSafe public class ExpressionEvaluationManager extends java.lang.ObjectExpression evaluation manager in general should be used by AbstractRefObject. All other access should be used for testing purposes only.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExpressionEvaluationManager.KeyHelper class.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<AbstractRepository,ExpressionEvaluationManager>mInstancesContains instances of theExpressionEvaluationManagerby repository.private java.lang.ThreadLocal<java.util.Collection<ExpressionEvaluationManager.Key>>mThreadLocalContains thread local set of evaluated objects.
-
Constructor Summary
Constructors Modifier Constructor Description privateExpressionEvaluationManager()Instances can be created by the class itself.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearEvaluationStatus(javax.jmi.reflect.RefObject object, java.lang.String property)Clears evaluation status of the specified object and specified property.(package private) static voidcreate(AbstractRepository repository)This method should be used by repository to create an instance ofExpressionEvaluationManager.private java.util.Collection<ExpressionEvaluationManager.Key>getEvaluated()Returns a collection of evaluated element properties of a thread.java.util.Collection<ExpressionEvaluationManager.Key>getEvaluatedProperties()Returns evaluated properties or null if no properties was evaluated.static ExpressionEvaluationManagergetInstance(AbstractRepository repository)Returns instance of ExpressionEvaluationManager by repository.booleanisEvaluated(javax.jmi.reflect.RefObject object, java.lang.String property)Checks the fact whether the property is evaluated for the specified object.voidsetAsEvaluated(javax.jmi.reflect.RefObject object, java.lang.String property)Sets specified object specified property as evaluated.
-
-
-
Field Detail
-
mInstances
private static final java.util.Map<AbstractRepository,ExpressionEvaluationManager> mInstances
Contains instances of theExpressionEvaluationManagerby repository.
-
mThreadLocal
private final java.lang.ThreadLocal<java.util.Collection<ExpressionEvaluationManager.Key>> mThreadLocal
Contains thread local set of evaluated objects.
-
-
Method Detail
-
getInstance
public static ExpressionEvaluationManager getInstance(AbstractRepository repository)
Returns instance of ExpressionEvaluationManager by repository.- Parameters:
repository- a repository.- Returns:
- ExpressionEvaluationHelper of the repository.
-
create
static void create(AbstractRepository repository)
This method should be used by repository to create an instance ofExpressionEvaluationManager.- Parameters:
repository- a repository.
-
getEvaluated
private java.util.Collection<ExpressionEvaluationManager.Key> getEvaluated()
Returns a collection of evaluated element properties of a thread.- Returns:
- evaluated properties collection.
-
isEvaluated
public boolean isEvaluated(javax.jmi.reflect.RefObject object, java.lang.String property)Checks the fact whether the property is evaluated for the specified object.- Parameters:
object- an object.property- a property.- Returns:
- true if the property value was evaluated.
-
getEvaluatedProperties
public java.util.Collection<ExpressionEvaluationManager.Key> getEvaluatedProperties()
Returns evaluated properties or null if no properties was evaluated. This is intended for testing only.- Returns:
- evaluated properties.
-
setAsEvaluated
public void setAsEvaluated(javax.jmi.reflect.RefObject object, java.lang.String property)Sets specified object specified property as evaluated.- Parameters:
object- an object.property- a property.
-
clearEvaluationStatus
public void clearEvaluationStatus(javax.jmi.reflect.RefObject object, java.lang.String property)Clears evaluation status of the specified object and specified property.- Parameters:
object- an object.property- a property.
-
-