## org.eclipse.ocl
Class EvaluationVisitorDecorator<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

    java.lang.Object
      org.eclipse.ocl.EvaluationVisitorDecorator<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

All Implemented Interfaces:
  EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>, Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>

    public class EvaluationVisitorDecorator<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

extends Object
implements EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

A visitor that decorates another `EvaluationVisitor`, to intercept invocations of the `visitXxx(...)` methods. By default, every visitation is simply delegated to the decorated visitor. Subclasses may extend these delegations with any additional behaviour that is required, even replacing calls to the delegate where necessary.

This class works together with the `AbstractEvaluationVisitor` to ensure that recursive `visitXxx()` calls are correctly intercepted by me (and not just implemented within the decorated visitor). Moreover, this works with decorators nested to any depth.

Constructor Summary
`protected` `EvaluationVisitorDecorator(EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> decorated)`

Method Summary
`protected EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>` `getDelegate()` Obtains the visitor that I decorate.
`Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>` `getEnvironment()` Obtains my delegate's environment.
`EvaluationEnvironment<C,O,P,CLS,E>` `getEvaluationEnvironment()` Obtains my delegate's evaluation environment.
`Map<? extends CLS,? extends Set<? extends E>>` `getExtentMap()` Obtains my delegate's extent map.
`Object` `visitAssociationClassCallExp(AssociationClassCallExp<C,P> callExp)` Delegates to my decorated visitor.
`Object` `visitBooleanLiteralExp(BooleanLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitCollectionItem(CollectionItem<C> item)` Delegates to my decorated visitor.
`Object` `visitCollectionLiteralExp(CollectionLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitCollectionRange(CollectionRange<C> range)` Delegates to my decorated visitor.
`Object` `visitConstraint(CT constraint)` Delegates to my decorated visitor.
`Object` `visitEnumLiteralExp(EnumLiteralExp<C,EL> literalExp)` Delegates to my decorated visitor.
`Object` `visitExpression(OCLExpression<C> expression)` Delegates to my decorated visitor.
`Object` `visitExpressionInOCL(ExpressionInOCL<C,PM> expression)` Delegates to my decorated visitor.
`Object` `visitIfExp(IfExp<C> ifExp)` Delegates to my decorated visitor.
`Object` `visitIntegerLiteralExp(IntegerLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitInvalidLiteralExp(InvalidLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitIterateExp(IterateExp<C,PM> callExp)` Delegates to my decorated visitor.
`Object` `visitIteratorExp(IteratorExp<C,PM> callExp)` Delegates to my decorated visitor.
`Object` `visitLetExp(LetExp<C,PM> letExp)` Delegates to my decorated visitor.
`Object` `visitMessageExp(MessageExp<C,COA,SSA> messageExp)` Delegates to my decorated visitor.
`Object` `visitNullLiteralExp(NullLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitOperationCallExp(OperationCallExp<C,O> callExp)` Delegates to my decorated visitor.
`Object` `visitPropertyCallExp(PropertyCallExp<C,P> callExp)` Delegates to my decorated visitor.
`Object` `visitRealLiteralExp(RealLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitStateExp(StateExp<C,S> stateExp)` Delegates to my decorated visitor.
`Object` `visitStringLiteralExp(StringLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitTupleLiteralExp(TupleLiteralExp<C,P> literalExp)` Delegates to my decorated visitor.
`Object` `visitTupleLiteralPart(TupleLiteralPart<C,P> part)` Delegates to my decorated visitor.
`Object` `visitTypeExp(TypeExp<C> typeExp)` Delegates to my decorated visitor.
`Object` `visitUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> literalExp)` Delegates to my decorated visitor.
`Object` `visitUnspecifiedValueExp(UnspecifiedValueExp<C> unspecExp)` Delegates to my decorated visitor.
`Object` `visitVariable(Variable<C,PM> variable)` Delegates to my decorated visitor.
`Object` `visitVariableExp(VariableExp<C,PM> variableExp)` Delegates to my decorated visitor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EvaluationVisitorDecorator

    protected EvaluationVisitorDecorator(EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> decorated)

Method Detail

### getDelegate

    protected final EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getDelegate()

  Obtains the visitor that I decorate.

  Returns:
    my decorated visitor

### getEnvironment

    public Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getEnvironment()

  Obtains my delegate's environment.

  Specified by:
    `getEnvironment` in interface `EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>`
  Returns:
    the environment

### getEvaluationEnvironment

    public EvaluationEnvironment<C,O,P,CLS,E> getEvaluationEnvironment()

  Obtains my delegate's evaluation environment.

  Specified by:
    `getEvaluationEnvironment` in interface `EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>`
  Returns:
    the evaluation environment

### getExtentMap

    public Map<? extends CLS,? extends Set<? extends E>> getExtentMap()

  Obtains my delegate's extent map.

  Specified by:
    `getExtentMap` in interface `EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>`
  Returns:
    the extent map

### visitConstraint

    public Object visitConstraint(CT constraint)

  Delegates to my decorated visitor.

  Specified by:
    `visitConstraint` in interface `EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>`
  Specified by:
    `visitConstraint` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    for boolean-valued constraints (invariant, precondition, postcondition) `Boolean.TRUE` if the constraint holds and `Boolean.FALSE` if it is violated (including evaluations that result in `OclInvalid`). For operation body conditions, the value of the operation result

### visitExpression

    public Object visitExpression(OCLExpression<C> expression)

  Delegates to my decorated visitor.

  Specified by:
    `visitExpression` in interface `EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>`
  Parameters:
    `expression` - the expression to evaluate
  Returns:
    the value of the expression

### visitAssociationClassCallExp

    public Object visitAssociationClassCallExp(AssociationClassCallExp<C,P> callExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitAssociationClassCallExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitBooleanLiteralExp

    public Object visitBooleanLiteralExp(BooleanLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitBooleanLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitCollectionItem

    public Object visitCollectionItem(CollectionItem<C> item)

  Delegates to my decorated visitor.

  Specified by:
    `visitCollectionItem` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitCollectionLiteralExp

    public Object visitCollectionLiteralExp(CollectionLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitCollectionLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitCollectionRange

    public Object visitCollectionRange(CollectionRange<C> range)

  Delegates to my decorated visitor.

  Specified by:
    `visitCollectionRange` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitEnumLiteralExp

    public Object visitEnumLiteralExp(EnumLiteralExp<C,EL> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitEnumLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitExpressionInOCL

    public Object visitExpressionInOCL(ExpressionInOCL<C,PM> expression)

  Delegates to my decorated visitor.

  Specified by:
    `visitExpressionInOCL` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitIfExp

    public Object visitIfExp(IfExp<C> ifExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitIfExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitIntegerLiteralExp

    public Object visitIntegerLiteralExp(IntegerLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitIntegerLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitInvalidLiteralExp

    public Object visitInvalidLiteralExp(InvalidLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitInvalidLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitIterateExp

    public Object visitIterateExp(IterateExp<C,PM> callExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitIterateExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitIteratorExp

    public Object visitIteratorExp(IteratorExp<C,PM> callExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitIteratorExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitLetExp

    public Object visitLetExp(LetExp<C,PM> letExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitLetExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitMessageExp

    public Object visitMessageExp(MessageExp<C,COA,SSA> messageExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitMessageExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitNullLiteralExp

    public Object visitNullLiteralExp(NullLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitNullLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitOperationCallExp

    public Object visitOperationCallExp(OperationCallExp<C,O> callExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitOperationCallExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitPropertyCallExp

    public Object visitPropertyCallExp(PropertyCallExp<C,P> callExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitPropertyCallExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitRealLiteralExp

    public Object visitRealLiteralExp(RealLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitRealLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitStateExp

    public Object visitStateExp(StateExp<C,S> stateExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitStateExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitStringLiteralExp

    public Object visitStringLiteralExp(StringLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitStringLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitTupleLiteralExp

    public Object visitTupleLiteralExp(TupleLiteralExp<C,P> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitTupleLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitTupleLiteralPart

    public Object visitTupleLiteralPart(TupleLiteralPart<C,P> part)

  Delegates to my decorated visitor.

  Specified by:
    `visitTupleLiteralPart` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitTypeExp

    public Object visitTypeExp(TypeExp<C> typeExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitTypeExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitUnlimitedNaturalLiteralExp

    public Object visitUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> literalExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitUnlimitedNaturalLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitUnspecifiedValueExp

    public Object visitUnspecifiedValueExp(UnspecifiedValueExp<C> unspecExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitUnspecifiedValueExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitVariable

    public Object visitVariable(Variable<C,PM> variable)

  Delegates to my decorated visitor.

  Specified by:
    `visitVariable` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

### visitVariableExp

    public Object visitVariableExp(VariableExp<C,PM> variableExp)

  Delegates to my decorated visitor.

  Specified by:
    `visitVariableExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.