Package org.eclipse.core.expressions

## Class TestExpression

- java.lang.Object
- - org.eclipse.core.expressions.Expression
  - - org.eclipse.core.expressions.TestExpression

    public class TestExpression
    extends Expression

Since:
  3.7

### Field Summary

### Fields inherited from class org.eclipse.core.expressions.Expression

`ATT_VALUE, FALSE, HASH_CODE_NOT_COMPUTED, HASH_FACTOR, TRUE`

### Constructor Summary

Constructors
`TestExpression​(String namespace, String property, Object[] args, Object expectedValue)`
`TestExpression​(String namespace, String property, Object[] args, Object expectedValue, boolean forcePluginActivation)`
`TestExpression​(IConfigurationElement element)`
`TestExpression​(Element element)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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.
`boolean` `testGetForcePluginActivation()`
`static org.eclipse.core.internal.expressions.TypeExtensionManager` `testGetTypeExtensionManager()`
`String` `toString()`

### Methods inherited from class org.eclipse.core.expressions.Expression

`computeExpressionInfo, equals, equals, hashCode, hashCode, hashCode`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### TestExpression

    public TestExpression​(IConfigurationElement element)
                   throws CoreException

Throws:
  `CoreException`

#### TestExpression

    public TestExpression​(Element element)
                   throws CoreException

Throws:
  `CoreException`

#### TestExpression

    public TestExpression​(String namespace,
                          String property,
                          Object[] args,
                          Object expectedValue)

#### TestExpression

    public TestExpression​(String namespace,
                          String property,
                          Object[] args,
                          Object expectedValue,
                          boolean forcePluginActivation)

### Method Detail

#### evaluate

    public EvaluationResult evaluate​(IEvaluationContext context)
                              throws CoreException

Description copied from class: `Expression`
Evaluates this expression.

Specified by:
  `evaluate` in class `Expression`
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 class `Expression`
Parameters:
  `info` - the expression information object used to collect the information

#### equals

    public boolean equals​(Object object)

Overrides:
  `equals` in class `Object`

#### 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 the `fHashCode` field. If the value returned from the method equals `Expression.HASH_CODE_NOT_COMPUTED` (e.g. `-1`) then the value is incremented by one.

This default implementation calls `super.hashCode()`

Overrides:
  `computeHashCode` in class `Expression`
Returns:
  a hash code for this object.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### testGetForcePluginActivation

    public boolean testGetForcePluginActivation()

#### testGetTypeExtensionManager

    public static org.eclipse.core.internal.expressions.TypeExtensionManager testGetTypeExtensionManager()