Package org.eclipse.core.expressions
Class WithExpression
- java.lang.Object
-
- org.eclipse.core.expressions.Expression
-
- org.eclipse.core.expressions.CompositeExpression
-
- org.eclipse.core.expressions.WithExpression
-
public class WithExpression extends CompositeExpression
- Since:
- 3.7
-
-
Field Summary
-
Fields inherited from class org.eclipse.core.expressions.CompositeExpression
fExpressions
-
Fields inherited from class org.eclipse.core.expressions.Expression
ATT_VALUE, FALSE, HASH_CODE_NOT_COMPUTED, HASH_FACTOR, TRUE
-
-
Constructor Summary
Constructors Constructor Description WithExpression(String variable)
WithExpression(IConfigurationElement configElement)
WithExpression(Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectExpressionInfo(ExpressionInfo info)
Collects information about this expression tree.protected int
computeHashCode()
Method to compute the hash code for this object.boolean
equals(Object object)
EvaluationResult
evaluate(IEvaluationContext context)
Evaluates this expression.String
toString()
-
Methods inherited from class org.eclipse.core.expressions.CompositeExpression
add, evaluateAnd, evaluateOr, getChildren
-
Methods inherited from class org.eclipse.core.expressions.Expression
computeExpressionInfo, equals, equals, hashCode, hashCode, hashCode
-
-
-
-
Constructor Detail
-
WithExpression
public WithExpression(IConfigurationElement configElement) throws CoreException
- Throws:
CoreException
-
WithExpression
public WithExpression(Element element) throws CoreException
- Throws:
CoreException
-
WithExpression
public WithExpression(String variable)
-
-
Method Detail
-
computeHashCode
protected int computeHashCode()
Description copied from class:Expression
Method to compute the hash code for this object. The result returned from this method in cached in thefHashCode
field. If the value returned from the method equalsExpression.HASH_CODE_NOT_COMPUTED
(e.g.-1
) then the value is incremented by one.This default implementation calls
super.hashCode()
- Overrides:
computeHashCode
in classCompositeExpression
- Returns:
- a hash code for this object.
-
evaluate
public EvaluationResult evaluate(IEvaluationContext context) throws CoreException
Description copied from class:Expression
Evaluates this expression.- Specified by:
evaluate
in classExpression
- Parameters:
context
- an evaluation context providing information like variable, name spaces, etc. necessary to evaluate this expression- Returns:
- the result of the expression evaluation
- Throws:
CoreException
- if the evaluation failed. The concrete reason is defined by the subclass implementing this method
-
collectExpressionInfo
public void collectExpressionInfo(ExpressionInfo info)
Description copied from class:Expression
Collects information about this expression tree. This default implementation add the expression's type to the set of misbehaving expression types.- Overrides:
collectExpressionInfo
in classCompositeExpression
- Parameters:
info
- the expression information object used to collect the information
-
toString
public String toString()
- Overrides:
toString
in classCompositeExpression
-
-