com.stateforge.statebuilder.java
Class CoderBaseJava

java.lang.Object
  extended by com.stateforge.statebuilder.CoderBase
      extended by com.stateforge.statebuilder.java.CoderBaseJava
Direct Known Subclasses:
CoderContext, CoderParallel, CoderState

public abstract class CoderBaseJava
extends CoderBase


Constructor Summary
CoderBaseJava(StateMachineModel model, com.sun.codemodel.JCodeModel code)
           
 
Method Summary
protected  void addParameter(com.sun.codemodel.JMethod method, Parameter parameter)
           
protected  String getAbstractContextClassName(State state)
           
protected  com.sun.codemodel.JCodeModel getCode()
           
 com.sun.codemodel.JExpression getContextParentExpression(State state, State stateNext)
          context context.getContextParent() context.getContextParent().getContextParent()
protected  com.sun.codemodel.JPackage getPackage()
           
protected  String getParallelClassName(State state)
          MicrowaveOperatingParallel
protected  String getParallelFieldName(State state)
          _parallelOperating
protected  String getParallelLocalVariableName(State state)
          parallelOperating
protected  void writeContextOnEnd(State state, State stateNext, com.sun.codemodel.JBlock block)
          context.onEnd() or context.getContextParent().onEnd() ...
protected  void writeProcessTransition(State state, State stateNext, com.sun.codemodel.JBlock block, String suffix)
          StateOperation.processTransitionPre(context, HelloWorldEndState.getInstance());
 
Methods inherited from class com.stateforge.statebuilder.CoderBase
code, getContextClassName, getContextParentClassName, getModel, getStateClassName, getStateClassName, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoderBaseJava

public CoderBaseJava(StateMachineModel model,
                     com.sun.codemodel.JCodeModel code)
Method Detail

getCode

protected com.sun.codemodel.JCodeModel getCode()

getPackage

protected com.sun.codemodel.JPackage getPackage()

addParameter

protected void addParameter(com.sun.codemodel.JMethod method,
                            Parameter parameter)
                     throws StateBuilderException
Throws:
StateBuilderException

getAbstractContextClassName

protected String getAbstractContextClassName(State state)
                                      throws StateBuilderException
Throws:
StateBuilderException

getParallelLocalVariableName

protected String getParallelLocalVariableName(State state)
parallelOperating

Parameters:
state -
Returns:

getParallelFieldName

protected String getParallelFieldName(State state)
_parallelOperating

Parameters:
state -
Returns:

getParallelClassName

protected String getParallelClassName(State state)
MicrowaveOperatingParallel

Parameters:
state -
Returns:

writeProcessTransition

protected void writeProcessTransition(State state,
                                      State stateNext,
                                      com.sun.codemodel.JBlock block,
                                      String suffix)
                               throws StateBuilderException
StateOperation.processTransitionPre(context, HelloWorldEndState.getInstance());

Parameters:
state -
stateNext -
suffix -
Throws:
StateBuilderException

writeContextOnEnd

protected void writeContextOnEnd(State state,
                                 State stateNext,
                                 com.sun.codemodel.JBlock block)
                          throws StateBuilderException
context.onEnd() or context.getContextParent().onEnd() ...

Parameters:
state -
stateNext -
block -
Throws:
StateBuilderException

getContextParentExpression

public com.sun.codemodel.JExpression getContextParentExpression(State state,
                                                                State stateNext)
                                                         throws StateBuilderException
context context.getContextParent() context.getContextParent().getContextParent()

Parameters:
state -
stateNext -
Returns:
Throws:
StateBuilderException


Copyright © 2015. All rights reserved.