Package org.eclipse.core.expressions
Class ExpressionInfo
java.lang.Object
org.eclipse.core.expressions.ExpressionInfo
A status object describing information about an expression tree.
This information can for example be used to decide whether an
expression tree has to be reevaluated if the value of some
variables changes.
This class is not intended to be extended by clients.
- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMarks the given property (the fully qualified name of aPropertyTesterproperty) as accessed.voidaddMisBehavingExpressionType(Class<?> clazz) Adds the given class to the list of misbehaving classes.voidaddVariableNameAccess(String name) Marks the given variable as accessed.String[]Returns the set of accessedPropertyTesterproperties.String[]Returns the set of accessed variables.Class<?>[]Returns the set of expression types which don't reimplement the newExpression.collectExpressionInfo(ExpressionInfo)method.booleanReturnstrueif the default variable is accessed by the expression tree.booleanReturnstrueif the system property is accessed by the expression tree.voidMarks the default variable as accessed.voidMarks the system property as accessed.voidmerge(ExpressionInfo other) Merges this reevaluation information with the given info.voidMerges this reevaluation information with the given info ignoring the default variable access.
-
Constructor Details
-
ExpressionInfo
public ExpressionInfo()
-
-
Method Details
-
hasDefaultVariableAccess
public boolean hasDefaultVariableAccess()Returnstrueif the default variable is accessed by the expression tree.- Returns:
- whether the default variable is accessed or not
-
markDefaultVariableAccessed
public void markDefaultVariableAccessed()Marks the default variable as accessed. -
hasSystemPropertyAccess
public boolean hasSystemPropertyAccess()Returnstrueif the system property is accessed by the expression tree.- Returns:
- whether the system property is accessed or not
-
markSystemPropertyAccessed
public void markSystemPropertyAccessed()Marks the system property as accessed. -
getAccessedVariableNames
Returns the set of accessed variables.- Returns:
- the set of accessed variables
-
addVariableNameAccess
Marks the given variable as accessed.- Parameters:
name- the accessed variable
-
getAccessedPropertyNames
Returns the set of accessedPropertyTesterproperties.- Returns:
- the fully qualified names of accessed properties, or an empty array
- Since:
- 3.4
- See Also:
-
addAccessedPropertyName
Marks the given property (the fully qualified name of aPropertyTesterproperty) as accessed.- Parameters:
name- the fully qualified property name- Since:
- 3.4
- See Also:
-
getMisbehavingExpressionTypes
Returns the set of expression types which don't reimplement the newExpression.collectExpressionInfo(ExpressionInfo)method. If one expression in the expression tree didn't implement the method, then no optimizations can be done. Returnsnullif all expressions implement the method.- Returns:
- the set of expression types which don't implement the
computeReevaluationInfomethod, ornullif all do
-
addMisBehavingExpressionType
Adds the given class to the list of misbehaving classes.- Parameters:
clazz- the class to add.
-
merge
Merges this reevaluation information with the given info.- Parameters:
other- the information to merge with
-
mergeExceptDefaultVariable
Merges this reevaluation information with the given info ignoring the default variable access.- Parameters:
other- the information to merge with
-