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

    java.lang.Object
      org.eclipse.ocl.utilities.AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>
          org.eclipse.ocl.AbstractEvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
              org.eclipse.ocl.EvaluationVisitorImpl<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 EvaluationVisitorImpl<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>

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

An evaluation visitor implementation for OCL expressions.

Since:
  1.3

Field Summary

Fields inherited from class org.eclipse.ocl.utilities.AbstractVisitor
`result`

Constructor Summary
`EvaluationVisitorImpl(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, EvaluationEnvironment<C,O,P,CLS,E> evalEnv, Map<? extends CLS,? extends Set<? extends E>> extentMap)` Constructor

Method Summary
`Object` `visitAssociationClassCallExp(AssociationClassCallExp<C,P> ae)` Callback for an AssociationClassCallExp visit.
`Object` `visitBooleanLiteralExp(BooleanLiteralExp<C> bl)` Callback for a BooleanLiteralExp visit.
`Object` `visitCollectionLiteralExp(CollectionLiteralExp<C> cl)` Callback for a CollectionLiteralExp visit.
`Object` `visitEnumLiteralExp(EnumLiteralExp<C,EL> el)` Callback for an EnumLiteralExp visit.
`Object` `visitIfExp(IfExp<C> ie)` Callback for an IfExp visit.
`Object` `visitIntegerLiteralExp(IntegerLiteralExp<C> il)` Callback for an IntegerLiteralExp visit.
`Object` `visitInvalidLiteralExp(InvalidLiteralExp<C> il)` Simply returns `AbstractVisitor.result`.
`Object` `visitIterateExp(IterateExp<C,PM> ie)` Callback for an IterateExp visit.
`Object` `visitIteratorExp(IteratorExp<C,PM> ie)` Callback for an IteratorExp visit.
`Object` `visitLetExp(LetExp<C,PM> l)` Callback for LetExp visit.
`Object` `visitMessageExp(MessageExp<C,COA,SSA> m)` Visits the message expression's target and then its arguments.
`Object` `visitNullLiteralExp(NullLiteralExp<C> il)` Simply returns `AbstractVisitor.result`.
`Object` `visitOperationCallExp(OperationCallExp<C,O> oc)` Callback for an OperationCallExp visit.
`Object` `visitPropertyCallExp(PropertyCallExp<C,P> pc)` Callback for a PropertyCallExp visit.
`Object` `visitRealLiteralExp(RealLiteralExp<C> rl)` Callback for a RealLiteralExp visit.
`Object` `visitStateExp(StateExp<C,S> s)` Simply returns `AbstractVisitor.result`.
`Object` `visitStringLiteralExp(StringLiteralExp<C> sl)` Callback for a StringLiteralExp visit.
`Object` `visitTupleLiteralExp(TupleLiteralExp<C,P> tl)` Callback for a TupleLiteralExp visit.
`Object` `visitTupleLiteralPart(TupleLiteralPart<C,P> tp)` Visits the tuple literal part's value, if any.
`Object` `visitTypeExp(TypeExp<C> t)` Callback for a TypeExp visiy.
`Object` `visitUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> literalExp)` Callback for an UnlimitedNaturalLiteralExp visit.
`Object` `visitUnspecifiedValueExp(UnspecifiedValueExp<C> uv)` Callback for an UnspecifiedValueExp visit.
`Object` `visitVariable(Variable<C,PM> vd)` Callback for a VariableDeclaration visit.
`Object` `visitVariableExp(VariableExp<C,PM> v)` Callback for a VariableExp visit.

Methods inherited from class org.eclipse.ocl.AbstractEvaluationVisitor

`call, coerceNumber, getBoolean, getEnvironment, getEvaluationEnvironment, getExtentMap, getInteger, getName, getOclInvalid, getOperationBody, getPropertyBody, getReal, getSpecification, getStandardLibrary, getString, getUMLReflection, getUnlimitedNatural, getVisitor, higherPrecisionNumber, isLaxNullHandling, isUndefined, navigate, oclIsKindOf, oclIsTypeOf, setEvaluationEnvironment, toString, visitConstraint, visitExpression`

Methods inherited from class org.eclipse.ocl.utilities.AbstractVisitor

`handleAssociationClassCallExp, handleCollectionItem, handleCollectionLiteralExp, handleCollectionRange, handleConstraint, handleExpressionInOCL, handleIfExp, handleIterateExp, handleIteratorExp, handleLetExp, handleMessageExp, handleOperationCallExp, handlePropertyCallExp, handleTupleLiteralExp, handleTupleLiteralPart, handleVariable, safeVisit, visitCollectionItem, visitCollectionRange, visitExpressionInOCL`

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

Methods inherited from interface org.eclipse.ocl.utilities.Visitor
`visitCollectionItem, visitCollectionRange, visitExpressionInOCL`

Constructor Detail

### EvaluationVisitorImpl

    public EvaluationVisitorImpl(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                 EvaluationEnvironment<C,O,P,CLS,E> evalEnv,
                                 Map<? extends CLS,? extends Set<? extends E>> extentMap)

  Constructor

  Parameters:
    `env` - an evaluation environment (map of variable names to values)
    `extentMap` - a map of classes to their instance lists

Method Detail

### visitOperationCallExp

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

  Callback for an OperationCallExp visit.

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

### visitIterateExp

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

  Callback for an IterateExp visit.

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

### visitIteratorExp

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

  Callback for an IteratorExp visit.

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

### visitEnumLiteralExp

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

  Callback for an EnumLiteralExp visit. Get the referred enum literal and return it as an Integer.

  Specified by:
    `visitEnumLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitEnumLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Parameters:
    `el` - the enumeration literal expresion
  Returns:
    the enumeration literal as an Integer

### visitVariableExp

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

  Callback for a VariableExp visit.

  Specified by:
    `visitVariableExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitVariableExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Parameters:
    `v` - the variable expression
  Returns:
    the value of the variable

### visitPropertyCallExp

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

  Callback for a PropertyCallExp visit. Evaluates the source of the expression and then reflectively gets the value of the property on the result. For example, in "self.foo", "self" is the source and would be evaluated first, then the value of the property "foo" would be accessed on that object.

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

### visitAssociationClassCallExp

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

  Callback for an AssociationClassCallExp visit. Evaluates the source of the expression and then reflectively gets the value of the reference on the result. For example, in "self.foo", "self" is the source and would be evaluated first, then the value of the reference "foo" would be derived on that object.

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

### visitVariable

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

  Callback for a VariableDeclaration visit.

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

### visitIfExp

    public Object visitIfExp(IfExp<C> ie)

  Callback for an IfExp visit.

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

### visitTypeExp

    public Object visitTypeExp(TypeExp<C> t)

  Callback for a TypeExp visiy.

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

### visitStateExp

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

  Description copied from class: `AbstractVisitor`
  Simply returns `AbstractVisitor.result`.

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

### visitMessageExp

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

  Description copied from class: `AbstractVisitor`
  Visits the message expression's target and then its arguments. Returns the result of `AbstractVisitor.handleMessageExp(MessageExp, Object, List)`.

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

### visitUnspecifiedValueExp

    public Object visitUnspecifiedValueExp(UnspecifiedValueExp<C> uv)

  Callback for an UnspecifiedValueExp visit.

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

### visitIntegerLiteralExp

    public Object visitIntegerLiteralExp(IntegerLiteralExp<C> il)

  Callback for an IntegerLiteralExp visit.

  Specified by:
    `visitIntegerLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitIntegerLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    the value of the integer literal as a java.lang.Integer.

### visitUnlimitedNaturalLiteralExp

    public Object visitUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> literalExp)

  Callback for an UnlimitedNaturalLiteralExp visit.

  Specified by:
    `visitUnlimitedNaturalLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitUnlimitedNaturalLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    the value of the natural literal as a java.lang.Integer.

### visitRealLiteralExp

    public Object visitRealLiteralExp(RealLiteralExp<C> rl)

  Callback for a RealLiteralExp visit.

  Specified by:
    `visitRealLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitRealLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    the value of the real literal as a java.lang.Double.

### visitStringLiteralExp

    public Object visitStringLiteralExp(StringLiteralExp<C> sl)

  Callback for a StringLiteralExp visit.

  Specified by:
    `visitStringLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitStringLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    the value of the string literal as a java.lang.String.

### visitBooleanLiteralExp

    public Object visitBooleanLiteralExp(BooleanLiteralExp<C> bl)

  Callback for a BooleanLiteralExp visit.

  Specified by:
    `visitBooleanLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitBooleanLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Returns:
    the value of the boolean literal as a java.lang.Boolean.

### visitInvalidLiteralExp

    public Object visitInvalidLiteralExp(InvalidLiteralExp<C> il)

  Description copied from class: `AbstractVisitor`
  Simply returns `AbstractVisitor.result`.

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

### visitNullLiteralExp

    public Object visitNullLiteralExp(NullLiteralExp<C> il)

  Description copied from class: `AbstractVisitor`
  Simply returns `AbstractVisitor.result`.

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

### visitLetExp

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

  Callback for LetExp visit.

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

### visitCollectionLiteralExp

    public Object visitCollectionLiteralExp(CollectionLiteralExp<C> cl)

  Callback for a CollectionLiteralExp visit.

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

### visitTupleLiteralExp

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

  Callback for a TupleLiteralExp visit.

  Specified by:
    `visitTupleLiteralExp` in interface `Visitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Overrides:
    `visitTupleLiteralExp` in class `AbstractVisitor<Object,C,O,P,EL,PM,S,COA,SSA,CT>`
  Parameters:
    `tl` - tuple literal expression
  Returns:
    String

### visitTupleLiteralPart

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

  Description copied from class: `AbstractVisitor`
  Visits the tuple literal part's value, if any. Returns the result of `AbstractVisitor.handleTupleLiteralPart(TupleLiteralPart, Object)`.

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

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