de.xabsl.jxabsl.expression.enumerated
Class EnumeratedExpression

java.lang.Object
  extended by de.xabsl.jxabsl.expression.enumerated.EnumeratedExpression
Direct Known Subclasses:
ConditionalEnumeratedExpression, EnumeratedInputSymbolRef, EnumeratedOptionParameterRef, EnumeratedOutputSymbolRef, EnumeratedValue

public abstract class EnumeratedExpression
extends java.lang.Object

Base class for all enumerated expressions in the option graph.


Field Summary
protected  DebugMessages debug
           
protected  Enumeration enumeration
           
 
Constructor Summary
protected EnumeratedExpression(DebugMessages debug)
           
 
Method Summary
static EnumeratedExpression create(Enumeration enumeration, InputSource input, java.util.List<Action> actions, DebugMessages debug, OptionParameters parameters, Symbols symbols, TimeFunction timeOfOptionExecution, TimeFunction timeOfStateExecution)
          Creates an enumerated expression depending on the input.
static java.lang.String elementFromIntermediateCode(java.lang.String name)
          Extract "element" from a name like "enumeration.element"
static java.lang.String enumerationFromIntermediateCode(java.lang.String name)
          Extract "enumeration" from a name like "enumeration.element"
 Enumeration getEnumeration()
           
abstract  java.lang.Object getValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected DebugMessages debug

enumeration

protected Enumeration enumeration
Constructor Detail

EnumeratedExpression

protected EnumeratedExpression(DebugMessages debug)
Method Detail

getValue

public abstract java.lang.Object getValue()

create

public static EnumeratedExpression create(Enumeration enumeration,
                                          InputSource input,
                                          java.util.List<Action> actions,
                                          DebugMessages debug,
                                          OptionParameters parameters,
                                          Symbols symbols,
                                          TimeFunction timeOfOptionExecution,
                                          TimeFunction timeOfStateExecution)
                                   throws IntermediateCodeMalformedException
Creates an enumerated expression depending on the input.

Parameters:
enumeration - A reference to the enumeration which is the domain of this expression
input - An input source for the intermediate code. It must be opened and read until A position where a enumerated expression starts.
actions - The subsequent behaviors i.e options and basic behaviors of the state.
debug - For debugging output
parameters - The parameters of the option
symbols - All available symbols
timeOfOptionExecution - The time how long the option is already active
timeOfStateExecution - The time how long the state is already active
Throws:
IntermediateCodeMalformedException

enumerationFromIntermediateCode

public static java.lang.String enumerationFromIntermediateCode(java.lang.String name)
Extract "enumeration" from a name like "enumeration.element"


elementFromIntermediateCode

public static java.lang.String elementFromIntermediateCode(java.lang.String name)
Extract "element" from a name like "enumeration.element"


getEnumeration

public Enumeration getEnumeration()
Returns:
The expression that is the domain of the enumeration