org.eclipse.ocl.examples.library
Class AbstractUnaryOperation

java.lang.Object
  extended by org.eclipse.ocl.examples.library.AbstractFeature
      extended by org.eclipse.ocl.examples.library.AbstractOperation
          extended by org.eclipse.ocl.examples.library.AbstractUnaryOperation
All Implemented Interfaces:
LibraryFeature, LibraryOperation, LibraryUnaryOperation, CallableImplementation
Direct Known Subclasses:
AbstractNumericUnaryOperation, BooleanNotOperation, CollectionAsBagOperation, CollectionAsOrderedSetOperation, CollectionAsSequenceOperation, CollectionAsSetOperation, CollectionFlattenOperation, CollectionIsEmptyOperation, CollectionNotEmptyOperation, CollectionSizeOperation, OclAnyOclAsSetOperation, OclAnyOclIsInvalidOperation, OclAnyOclIsUndefinedOperation, OrderedCollectionFirstOperation, OrderedCollectionLastOperation, OrderedCollectionReverseOperation, StringCharactersOperation, StringSizeOperation, StringToBooleanOperation, StringToIntegerOperation, StringToLowerCaseOperation, StringToRealOperation, StringToUpperCaseOperation

public abstract class AbstractUnaryOperation
extends AbstractOperation
implements LibraryUnaryOperation

AbstractBinaryOperation dispatches a unary library operation to matching-type-specific call-backs.

Since:
3.1

Constructor Summary
AbstractUnaryOperation()
           
 
Method Summary
 Value evaluate(EvaluationVisitor evaluationVisitor, Value sourceVal, OperationCallExp operationCall)
          Return the result of evaluating operationCall upon sourceVal within the environment provided by EvaluationVisitor.
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractOperation
evaluate, evaluateArgument, getNumArguments
 
Methods inherited from class org.eclipse.ocl.examples.library.AbstractFeature
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.library.LibraryUnaryOperation
evaluate
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.evaluation.CallableImplementation
evaluate, validate
 

Constructor Detail

AbstractUnaryOperation

public AbstractUnaryOperation()
Method Detail

evaluate

public Value evaluate(EvaluationVisitor evaluationVisitor,
                      Value sourceVal,
                      OperationCallExp operationCall)
               throws InvalidValueException
Description copied from interface: LibraryOperation
Return the result of evaluating operationCall upon sourceVal within the environment provided by EvaluationVisitor. An invalid return may be indicated by throwing an exception returning Java null or OCL invalid.

Specified by:
evaluate in interface LibraryOperation
Parameters:
evaluationVisitor - the evaluation context
sourceVal - the source operand for the operation
operationCall - the operation and additional arguments
Returns:
the evaluated value
Throws:
InvalidValueException