Class ContextStack

java.lang.Object
org.glassfish.rmic.iiop.ContextStack

public class ContextStack extends Object
ContextStack provides a mechanism to record parsing state.
  • Field Details

  • Constructor Details

  • Method Details

    • anyErrors

      public boolean anyErrors()
      Return true if env.nerrors > 0.
    • setTrace

      public void setTrace(boolean trace)
      Enable/disable tracing.
    • isTraceOn

      public boolean isTraceOn()
      Check trace flag.
    • getEnv

      public BatchEnvironment getEnv()
      Get the environment.
    • setNewContextCode

      public void setNewContextCode(int code)
      Set the new context.
    • getCurrentContextCode

      public int getCurrentContextCode()
      Get the current context code.
    • traceCallStack

      final void traceCallStack()
      If tracing on, write the current call stack (not the context stack) to System.out.
    • dumpCallStack

      public static final void dumpCallStack()
    • tracePrint

      private final void tracePrint(String text, boolean line)
      Print a line indented by stack depth.
    • trace

      final void trace(String text)
      If tracing on, print a line.
    • traceln

      final void traceln(String text)
      If tracing on, print a line followed by a '\n'.
    • traceExistingType

      final void traceExistingType(Type type)
      If tracing on, print a pre-mapped ContextElement.
    • push

      public TypeContext push(ContextElement element)
      Push a new element on the stack.
      Returns:
      the new element.
    • pop

      public TypeContext pop(boolean wasValid)
      Pop an element from the stack.
      Returns:
      the new current element or null if top.
    • size

      public int size()
      Get the current size.
    • getContext

      public TypeContext getContext(int index)
      Get a specific context.
    • getContext

      public TypeContext getContext()
      Get the current top context.
    • isParentAValue

      public boolean isParentAValue()
      Is parent context a value type?
    • getParentContext

      public TypeContext getParentContext()
      Get parent context. Null if none.
    • getContextCodeString

      public String getContextCodeString()
      Get a string for the context name...
    • getContextCodeString

      public static String getContextCodeString(int contextCode)
      Get a string for the given context code...
    • toTrialString

      private String toTrialString(TypeContext it)
    • toResultString

      private String toResultString(TypeContext it, boolean result, boolean preExisting)
    • clear

      public void clear()