Class SimulatedStackHelper

java.lang.Object
org.palladiosimulator.simulizar.utils.SimulatedStackHelper

public final class SimulatedStackHelper extends Object
A simulated stack for the pcm interpreter with some convenience methods.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.palladiosimulator.pcm.stoex.api.StoExSerialiser
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final void
    addParameterToStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> contextStackFrame, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> targetStackFrame)
    Adds parameters to given stack frame.
    static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object>
    createAndPushNewStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter)
    Convenience method creating new stack frame, adds it to stack and puts parameters into frame.
    static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object>
    createAndPushNewStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> parent)
    Convenience method creating new stack frame with parent, adds it to stack and puts parameters into frame.
    static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object>
    Convenience method for creating a new stack frame that contains the elements in the given map.
    static boolean
    isInnerReference(de.uka.ipd.sdq.stoex.AbstractNamedReference reference)
    Returns whether the specified reference belongs to an INNER variable characterisation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • STOEX_SERIALISER

      protected static final org.palladiosimulator.pcm.stoex.api.StoExSerialiser STOEX_SERIALISER
  • Constructor Details

    • SimulatedStackHelper

      public SimulatedStackHelper()
  • Method Details

    • addParameterToStackFrame

      public static final void addParameterToStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> contextStackFrame, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> targetStackFrame)
      Adds parameters to given stack frame.
      Parameters:
      parameter - the parameter.
      targetStackFrame - the stack frame.
    • isInnerReference

      public static boolean isInnerReference(de.uka.ipd.sdq.stoex.AbstractNamedReference reference)
      Returns whether the specified reference belongs to an INNER variable characterisation.
      Parameters:
      reference - the named reference associated with a variable characterisation
      Returns:
      true, if the reference's name is "INNER"; false else.
    • createAndPushNewStackFrame

      public static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> createAndPushNewStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter)
      Convenience method creating new stack frame, adds it to stack and puts parameters into frame. This method uses own stack for parameter evaluation.
      Parameters:
      parameter - the parameter.
      Returns:
      the created stack frame.
    • createAndPushNewStackFrame

      public static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> createAndPushNewStackFrame(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> parent)
      Convenience method creating new stack frame with parent, adds it to stack and puts parameters into frame. This method uses own stack for parameter evaluation.
      Parameters:
      parameter - the parameter.
      parent - the parent, if null no parent will be set.
      Returns:
      the created stack frame.
    • createFromMap

      public static final de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> createFromMap(Map<String,Object> map)
      Convenience method for creating a new stack frame that contains the elements in the given map. Does not validate the input.
      Parameters:
      map - the map of entries the new stack frame is to contain
      Returns:
      the created stack frame