krieger.oclruntime
Class QueryEvaluator<K>

java.lang.Object
  extended by krieger.oclruntime.QueryEvaluator<K>
Type Parameters:
K - The type used for identifying queries.
All Implemented Interfaces:
java.io.Serializable

public class QueryEvaluator<K>
extends java.lang.Object

A class for evaluating OCL queries represented by Expressions in the context of a method call.

See Also:
Serialized Form

Constructor Summary
QueryEvaluator(ClassifierFactory<java.lang.String> classifierFactory, PropertyContainer<PropertyID,java.lang.String> translatedProperties, Constant<?> selfVar, java.util.List<Constant<? extends Expression>> inParams, Variable<? extends Expression> returnValue, Problem problem, java.util.Map<K,? extends Expression> queries)
          Constructs a new QueryEvaluator.
 
Method Summary
 void evaluate(java.lang.Object self, java.lang.Object... arguments)
          Evaluates all queries.
 java.lang.Object getResult(K key)
          Returns the result of the evaluation for the given query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryEvaluator

public QueryEvaluator(ClassifierFactory<java.lang.String> classifierFactory,
                      PropertyContainer<PropertyID,java.lang.String> translatedProperties,
                      Constant<?> selfVar,
                      java.util.List<Constant<? extends Expression>> inParams,
                      Variable<? extends Expression> returnValue,
                      Problem problem,
                      java.util.Map<K,? extends Expression> queries)
Constructs a new QueryEvaluator.

Method Detail

evaluate

public void evaluate(java.lang.Object self,
                     java.lang.Object... arguments)
Evaluates all queries.

Parameters:
self - The object the method is called on.
arguments - The arguments to the method call.

getResult

public java.lang.Object getResult(K key)
Returns the result of the evaluation for the given query.

Parameters:
key - Identifies the query.