Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

Uses of Class
dk.rode.thesis.interpreter.Context

Packages that use Context
dk.rode.thesis.builder Implementations and examples of the Builder design pattern [Gamma95, p.97]. 
dk.rode.thesis.interpreter Implementations and examples of the Interpreter design pattern [Gamma95, p.243]. 
 

Uses of Context in dk.rode.thesis.builder
 

Fields in dk.rode.thesis.builder declared as Context
protected  Context AbstractExpressionBuilder.context
          The context used to register created variables and store created constants.
 

Methods in dk.rode.thesis.builder that return Context
 Context AbstractExpressionBuilder.getContext()
          Return the context used by this builder.
 

Methods in dk.rode.thesis.builder with parameters of type Context
 String TypedFlowExpression.asSymbol(Context context)
           
 E TypedFlowExpression.evaluate(Context context)
           
 

Constructors in dk.rode.thesis.builder with parameters of type Context
AbstractExpressionBuilder(Context context, Sequence<? extends E> sequence)
          Constructor.
CountingComparableExpressionBuilder(Context context, Sequence<? extends E> sequence)
          Constructor.
CountingExpressionBuilder(Context context, Sequence<? extends E> sequence)
          Constructor.
StandardComparableExpressionBuilder(Context context, Sequence<? extends E> sequence)
          Constructor.
StandardExpressionBuilder(Context context, Sequence<? extends E> sequence)
          Constructor.
 

Uses of Context in dk.rode.thesis.interpreter
 

Methods in dk.rode.thesis.interpreter that return Context
 Context Context.clear()
          Clears all stored variables or touched expressions.
 Context Context.reset()
          Resets the internal set of touched expressions.
 

Methods in dk.rode.thesis.interpreter with parameters of type Context
 String VariableExpression.asSymbol(Context context)
          Returns x, where x is the name of this variable, or if type information is included, Type{x}, where Type is the simple name of the type.
 String TypedExpressionDecorator.asSymbol(Context context)
          Returns x, where x is the symbolic representation of the decorated expression, or if type information is included, Type{x}, where Type is the simple name of the type.
 String SetExpression.asSymbol(Context context)
          Returns set[x], where x is the symbolic representation of the expression that will determine the value, or set#123[x], where 123 is the identity hash code of the manipulated sequence.
 String SequenceExpression.asSymbol(Context context)
          Returns name, where name is the actual name of this expression, or name#123, where 123 is the identity hash code of the manipulated sequence.
 String ReverseExpression.asSymbol(Context context)
          Returns reverse[x], where x is the symbolic representation of the expression used to determine if the sequence should be reversed, or reverse#123[x], where 123 is the identity hash code of the manipulated sequence.
 String OrExpression.asSymbol(Context context)
          Returns (x || y) if short-circuit, or (x | y), where x is the symbolic representation of the first expression operand and y of the second.
 String NotExpression.asSymbol(Context context)
          Returns {@code (!
 String NextExpression.asSymbol(Context context)
          Returns next[x], where x is the symbolic representation of the expression that will determine the number of times to invoke next(), or next#123[x], where 123 is the identity hash code of the manipulated sequence.
 String FlowExpression.asSymbol(Context context)
          Returns x, y, z, .., where x, y, z, .., are the symbol representations of the contained expressions.
 String Expression.asSymbol(Context context)
          Returns a short symbolic representation of this expression that describes it in a concise form.
 String EqualExpression.asSymbol(Context context)
          Returns x == y, where x is the symbolic representation of the first expression operand and y of the the second.
 String ConstantExpression.asSymbol(Context context)
          Returns x, where x is the value of this constant, or if type information is included, Type{x}, where Type is the simple name of the type.
 String ConditionalExpression.asSymbol(Context context)
          Returns {@code (c ?
 String CompareExpression.asSymbol(Context context)
          Returns x operator y, where x is the symbolic representation of the first expression operand, y of the the second, and operator is the operator used for the comparison.
 String BreakExpression.asSymbol(Context context)
          Returns either exit or break[x], where x is the symbol representation of the target expression used, if any.
 String AssignmentExpression.asSymbol(Context context)
          Returns x = y, where x is the symbolic representation of the first expression operand and y of the the second.
 String AndExpression.asSymbol(Context context)
          Returns (x && y) if short-circuit, or (x & y), where x is the symbolic representation of the first expression operand and y of the second.
static StringBuilder Expression.SymbolIdiom.asSymbol(Context context, Expression<?> parent, Expression<?> child)
          See Expression.asSymbol(Context).
static StringBuilder Expression.SymbolIdiom.asSymbol(Context context, Expression<?> parent, Expression<?> child, StringBuilder sb)
          See Expression.asSymbol(Context).
protected  String BinaryExpression.asSymbol(Context context, String separator)
          Returns x separator y, where x is the symbolic representation of the first expression operand and y of the the second.
protected  StringBuilder BinaryExpression.asSymbol(Context context, String separator, StringBuilder sb)
          Returns x separator y, where x is the symbolic representation of the first expression operand and y of the the second.
private
<E extends Comparable<? super E>>
Expression<E>
Main.create1(Sequence<E> sequence, Class<E> type, E value, Context context)
          Creates: next[20], y = current, (reverse[true] ?
private
<E extends Number & Comparable<? super E>>
Expression<E>
Main.create2(Sequence<E> sequence, Class<E> type, E value, Context context)
          Creates: next[value], foo = Integer{next[(boo ?
private
<E extends Comparable<? super E>>
Expression<E>
Main.create3(Sequence<E> sequence, Class<E> type, E value, Context context)
          Creates a loop-structure by using cyclic expression references without intermediate variables: (current < value ?
private
<E extends Number & Comparable<? super E>>
Expression<E>
Main.create4(Sequence<E> sequence, Class<E> type, E value1, E value2, Context context)
          Generates the mother of all sequence expressions: (current < value1 ?
private  Expression<Comparable<?>> Main.create5(Context context, Sequence<String> string, Sequence<Integer> integer, String stringValue, Integer integerValue)
          Creates an expression with a loop having 15 iterations as well as different sequences and types: ((!
 E VariableExpression.evaluate(Context context)
           
 E TypedExpressionDecorator.evaluate(Context context)
           
 E SetExpression.evaluate(Context context)
           
 Boolean ReverseExpression.evaluate(Context context)
           
 E ResetExpression.evaluate(Context context)
           
 Boolean OrExpression.evaluate(Context context)
           
 Boolean NotExpression.evaluate(Context context)
           
 E NextExpression.evaluate(Context context)
           
 E FlowExpression.evaluate(Context context)
           
 E Expression.evaluate(Context context)
          Evaluates this expression and returns the result.
 Boolean EqualExpression.evaluate(Context context)
           
 E CurrentExpression.evaluate(Context context)
           
 E ConstantExpression.evaluate(Context context)
           
 E ConditionalExpression.evaluate(Context context)
           
 Boolean CompareExpression.evaluate(Context context)
           
 E BreakExpression.evaluate(Context context)
           
 E AssignmentExpression.evaluate(Context context)
           
 Boolean AndExpression.evaluate(Context context)
           
<E extends T>
T
Interpreter.interpret(Context context, Expression<E> expression)
          Interpret the expression syntax tree having the root supplied as expression, and returns the result.
<E extends T>
E
Interpreter.interpret(Context context, Expression<E> expression, Class<? super E> type)
          Interpret the expression syntax tree having the root supplied as expression, and returns the result.
 

Constructors in dk.rode.thesis.interpreter with parameters of type Context
Context(Context context)
          Copy constructor.
 


Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.