Package org.glassfish.rmic.iiop
Class ContextStack
java.lang.Object
org.glassfish.rmic.iiop.ContextStack
ContextStack provides a mechanism to record parsing state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]private intprivate BatchEnvironmentstatic final intstatic final intprivate intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate intprivate TypeContext[]private TypeContextstatic final intprivate booleanprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true ifenv.nerrors > 0.voidclear()static final voidGet the current top context.getContext(int index) Get a specific context.Get a string for the context name...static StringgetContextCodeString(int contextCode) Get a string for the given context code...intGet the current context code.getEnv()Get the environment.Get parent context.booleanIs parent context a value type?booleanCheck trace flag.pop(boolean wasValid) Pop an element from the stack.push(ContextElement element) Push a new element on the stack.voidsetNewContextCode(int code) Set the new context.voidsetTrace(boolean trace) Enable/disable tracing.intsize()Get the current size.private StringtoResultString(TypeContext it, boolean result, boolean preExisting) private String(package private) final voidIf tracing on, print a line.(package private) final voidIf tracing on, write the current call stack (not the context stack) to System.out.(package private) final voidtraceExistingType(Type type) If tracing on, print a pre-mapped ContextElement.(package private) final voidIf tracing on, print a line followed by a '\n'.private final voidtracePrint(String text, boolean line) Print a line indented by stack depth.
-
Field Details
-
TOP
public static final int TOP- See Also:
-
METHOD
public static final int METHOD- See Also:
-
METHOD_RETURN
public static final int METHOD_RETURN- See Also:
-
METHOD_ARGUMENT
public static final int METHOD_ARGUMENT- See Also:
-
METHOD_EXCEPTION
public static final int METHOD_EXCEPTION- See Also:
-
MEMBER
public static final int MEMBER- See Also:
-
MEMBER_CONSTANT
public static final int MEMBER_CONSTANT- See Also:
-
MEMBER_STATIC
public static final int MEMBER_STATIC- See Also:
-
MEMBER_TRANSIENT
public static final int MEMBER_TRANSIENT- See Also:
-
IMPLEMENTS
public static final int IMPLEMENTS- See Also:
-
EXTENDS
public static final int EXTENDS- See Also:
-
CODE_NAMES
-
currentIndex
private int currentIndex -
maxIndex
private int maxIndex -
stack
-
newCode
private int newCode -
env
-
trace
private boolean trace -
tempContext
-
TRACE_INDENT
- See Also:
-
-
Constructor Details
-
ContextStack
Constructor.
-
-
Method Details
-
anyErrors
public boolean anyErrors()Return true ifenv.nerrors > 0. -
setTrace
public void setTrace(boolean trace) Enable/disable tracing. -
isTraceOn
public boolean isTraceOn()Check trace flag. -
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
Print a line indented by stack depth. -
trace
If tracing on, print a line. -
traceln
If tracing on, print a line followed by a '\n'. -
traceExistingType
If tracing on, print a pre-mapped ContextElement. -
push
Push a new element on the stack.- Returns:
- the new element.
-
pop
Pop an element from the stack.- Returns:
- the new current element or null if top.
-
size
public int size()Get the current size. -
getContext
Get a specific context. -
getContext
Get the current top context. -
isParentAValue
public boolean isParentAValue()Is parent context a value type? -
getParentContext
Get parent context. Null if none. -
getContextCodeString
Get a string for the context name... -
getContextCodeString
Get a string for the given context code... -
toTrialString
-
toResultString
-
clear
public void clear()
-