uk.ac.ucl.cs.emofocl.ocl.interpreter
Class EMOFOCLInterpreter
java.lang.Object
uk.ac.ucl.cs.emofocl.ocl.interpreter.EMOFOCLInterpreter
- All Implemented Interfaces:
- EMOFOCLVisitor, ExtVisitor
public class EMOFOCLInterpreter
- extends Object
- implements EMOFOCLVisitor
- Author:
- James
Method Summary |
void |
addVariable(String name,
Object value)
|
Object |
evaluate(OclExpression expression)
|
Object |
evaluate(OclExpression expression,
javax.jmi.reflect.RefObject self)
|
Object |
lookupVariable(String name)
|
Object |
visit(AnyType element,
Object argument)
|
Object |
visit(BooleanLiteralExp element,
Object argument)
|
Object |
visit(CollectionItem element,
Object argument)
|
Object |
visit(CollectionLiteralExp element,
Object argument)
|
Object |
visit(CollectionRange element,
Object argument)
|
Object |
visit(CollectionType element,
Object argument)
|
Object |
visit(EnumerationLiteral element,
Object argument)
|
Object |
visit(Enumeration element,
Object argument)
|
Object |
visit(EnumLiteralExp element,
Object argument)
|
Object |
visit(IfExp element,
Object argument)
|
Object |
visit(IntegerLiteralExp element,
Object argument)
|
Object |
visit(InvalidLiteralExp element,
Object argument)
|
Object |
visit(InvalidType element,
Object argument)
|
Object |
visit(IterateExp element,
Object argument)
|
Object |
visit(IteratorExp element,
Object argument)
|
Object |
visit(LetExp element,
Object argument)
|
Object |
visit(LibraryOperationCallExp element,
Object argument)
|
Object |
visit(MOFClass element,
Object argument)
|
Object |
visit(MOFPackage element,
Object argument)
|
Object |
visit(NullLiteralExp element,
Object argument)
|
Object |
visit(OCLEquivalentPrimitiveType element,
Object argument)
|
Object |
visit(OperationCallExp element,
Object argument)
|
Object |
visit(Operation element,
Object argument)
|
Object |
visit(Parameter element,
Object argument)
|
Object |
visit(PrimitiveType element,
Object argument)
|
Object |
visit(PropertyCallExp element,
Object argument)
|
Object |
visit(Property element,
Object argument)
|
Object |
visit(RealLiteralExp element,
Object argument)
|
Object |
visit(ReflectiveOperationCallExp element,
Object argument)
|
Object |
visit(Specification element,
Object argument)
|
Object |
visit(StringLiteralExp element,
Object argument)
|
Object |
visit(TupleLiteralExp element,
Object argument)
|
Object |
visit(TupleType element,
Object argument)
|
Object |
visit(TupleTypePart element,
Object argument)
|
Object |
visit(VariableDeclaration element,
Object argument)
|
Object |
visit(VariableExp element,
Object argument)
|
Object |
visit(VoidType element,
Object argument)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMOFOCLInterpreter
public EMOFOCLInterpreter()
EMOFOCLInterpreter
public EMOFOCLInterpreter(EMOFOCLInterpreter parent)
EMOFOCLInterpreter
public EMOFOCLInterpreter(Object self)
evaluate
public Object evaluate(OclExpression expression)
throws Exception
- Throws:
Exception
lookupVariable
public Object lookupVariable(String name)
addVariable
public void addVariable(String name,
Object value)
evaluate
public Object evaluate(OclExpression expression,
javax.jmi.reflect.RefObject self)
throws Exception
- Throws:
Exception
visit
public Object visit(VariableExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(LetExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(IfExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(PropertyCallExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(OperationCallExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(LibraryOperationCallExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(IntegerLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(RealLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(StringLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(BooleanLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(IteratorExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(IterateExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(CollectionRange element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(CollectionItem element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(CollectionLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(TupleLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(EnumLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(ReflectiveOperationCallExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(NullLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(InvalidLiteralExp element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(Specification element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(OCLEquivalentPrimitiveType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(TupleType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(CollectionType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(TupleTypePart element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(MOFPackage element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(EnumerationLiteral element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(Enumeration element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(PrimitiveType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(MOFClass element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(Property element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(Operation element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(Parameter element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(VariableDeclaration element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(AnyType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(VoidType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception
visit
public Object visit(InvalidType element,
Object argument)
throws Exception
- Specified by:
visit
in interface EMOFOCLVisitor
- Throws:
Exception