public class ContextStack extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EXTENDS |
static int |
IMPLEMENTS |
static int |
MEMBER |
static int |
MEMBER_CONSTANT |
static int |
MEMBER_STATIC |
static int |
MEMBER_TRANSIENT |
static int |
METHOD |
static int |
METHOD_ARGUMENT |
static int |
METHOD_EXCEPTION |
static int |
METHOD_RETURN |
static int |
TOP |
| Constructor and Description |
|---|
ContextStack(BatchEnvironment env)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
anyErrors()
Return true if env.nerrors > 0.
|
void |
clear() |
static void |
dumpCallStack() |
TypeContext |
getContext()
Get the current top context.
|
TypeContext |
getContext(int index)
Get a specific context.
|
String |
getContextCodeString()
Get a string for the context name...
|
static String |
getContextCodeString(int contextCode)
Get a string for the given context code...
|
int |
getCurrentContextCode()
Get the current context code.
|
BatchEnvironment |
getEnv()
Get the environment.
|
TypeContext |
getParentContext()
Get parent context.
|
boolean |
isParentAValue()
Is parent context a value type?
|
boolean |
isTraceOn()
Check trace flag.
|
TypeContext |
pop(boolean wasValid)
Pop an element from the stack.
|
TypeContext |
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.
|
(package private) void |
trace(String text)
If tracing on, print a line.
|
(package private) void |
traceCallStack()
If tracing on, write the current call stack (not the context stack) to
System.out.
|
(package private) void |
traceExistingType(Type type)
If tracing on, print a pre-mapped ContextElement.
|
(package private) void |
traceln(String text)
If tracing on, print a line followed by a '\n'.
|
public static final int TOP
public static final int METHOD
public static final int METHOD_RETURN
public static final int METHOD_ARGUMENT
public static final int METHOD_EXCEPTION
public static final int MEMBER
public static final int MEMBER_CONSTANT
public static final int MEMBER_STATIC
public static final int MEMBER_TRANSIENT
public static final int IMPLEMENTS
public static final int EXTENDS
public ContextStack(BatchEnvironment env)
public boolean anyErrors()
public void setTrace(boolean trace)
public boolean isTraceOn()
public BatchEnvironment getEnv()
public void setNewContextCode(int code)
public int getCurrentContextCode()
final void traceCallStack()
public static final void dumpCallStack()
final void traceExistingType(Type type)
public TypeContext push(ContextElement element)
public TypeContext pop(boolean wasValid)
public int size()
public TypeContext getContext(int index)
public TypeContext getContext()
public boolean isParentAValue()
public TypeContext getParentContext()
public String getContextCodeString()
public static String getContextCodeString(int contextCode)
public void clear()