# Class CompositeExpression

java.lang.Object
org.eclipse.core.expressions.Expression
org.eclipse.core.expressions.CompositeExpression

Direct Known Subclasses:
  `AndExpression, OrExpression, WithExpression`

public abstract class CompositeExpression extends Expression

Since:
  3.7

## Field Summary

Fields
Modifier and Type
Field
Description
`protected List<Expression>`
`fExpressions`

### Fields inherited from class Expression

`ATT_VALUE, FALSE, HASH_CODE_NOT_COMPUTED, HASH_FACTOR, TRUE`

## Constructor Summary

Constructors
Constructor
Description
`CompositeExpression()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(Expression expression)`
`void`
`collectExpressionInfo(ExpressionInfo info)`
Collects information about this expression tree.
`protected int`
`computeHashCode()`
Method to compute the hash code for this object.
`protected EvaluationResult`
`evaluateAnd(IEvaluationContext scope)`
`protected EvaluationResult`
`evaluateOr(IEvaluationContext scope)`
`Expression[]`
`getChildren()`
`String`
`toString()`

### Methods inherited from class Expression

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

### Methods inherited from class Object

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

## Field Details

### fExpressions

protected List<Expression> fExpressions

## Constructor Details

### CompositeExpression

public CompositeExpression()

## Method Details

### add

public void add(Expression expression)

### getChildren

public Expression[] getChildren()

### evaluateAnd

protected EvaluationResult evaluateAnd(IEvaluationContext scope) throws CoreException

Throws:
  `CoreException`

### evaluateOr

protected EvaluationResult evaluateOr(IEvaluationContext scope) throws CoreException

Throws:
  `CoreException`

### 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

### 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`