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 int
private BatchEnvironment
static final int
static final int
private int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private int
private TypeContext[]
private TypeContext
static final int
private boolean
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true ifenv.nerrors > 0
.void
clear()
static final void
Get the current top context.getContext
(int index) Get a specific context.Get a string for the context name...static String
getContextCodeString
(int contextCode) Get a string for the given context code...int
Get the current context code.getEnv()
Get the environment.Get parent context.boolean
Is parent context a value type?boolean
Check trace flag.pop
(boolean wasValid) Pop an element from the stack.push
(ContextElement element) Push a new element on the stack.void
setNewContextCode
(int code) Set the new context.void
setTrace
(boolean trace) Enable/disable tracing.int
size()
Get the current size.private String
toResultString
(TypeContext it, boolean result, boolean preExisting) private String
(package private) final void
If tracing on, print a line.(package private) final void
If tracing on, write the current call stack (not the context stack) to System.out.(package private) final void
traceExistingType
(Type type) If tracing on, print a pre-mapped ContextElement.(package private) final void
If tracing on, print a line followed by a '\n'.private final void
tracePrint
(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()
-