|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.util.Utils
public final class Utils
A set of static methods utilized by the IBM Reflexive GUI Builder. All parameters for the trace stream and level are also set and maintaned by this class
Field Summary | |
---|---|
static int |
ALL
Highest trace level: all information regarding process of GUI construction and execution and validation; includes: warnings and errors from interpreter engine and validator (if present and active) information regarding GUI construction (e.g. steps of algorithm, nodes being built) level 2 information + execution of code blocks and notices about instantiations of objects all level 3 information + constructors and methods being considered and arguments to chosen constructors and methods |
static int |
ERRORS
only errors are printed |
static int |
FATAL
only fatal errors and exception messages are printed |
static int |
NONE
only fatal errors and exception messages are printed |
static int |
PROCESS_ALL
information reported at previous levels + information about executable code and more details about the algorithm of construction |
static int |
PROCESS_INFO
information regarding the GUI construction and validation process including nodes being built and object instantiations |
static int |
WARNINGS
warnings and errors only |
Constructor Summary | |
---|---|
protected |
Utils()
|
Method Summary | |
---|---|
static String |
arrayAsString(String[] str)
|
static void |
endSubprocess()
alert tracer that a process is ending. |
static String |
escape(String s)
Replace XML specific characters with entities. |
static String |
firstCharToUpper(String str)
converts the first character of the given string to uppper case |
static Throwable |
getRootException(Throwable t)
retreave the root exception of the given Throwable |
static int |
getTraceLevel()
get the current trace level |
static IReporter |
getTracer()
returns the active tracer |
static void |
println(int level,
String str)
print the given information according to the given level. |
static void |
println(String errorKey,
String msg)
output an error. |
static void |
println(String errorKey,
String msg,
Throwable t)
output an error. |
static void |
println(String errorKey,
Throwable t)
output an error. |
static void |
printParams(int level,
Object[] params)
print the members of the given array. |
static void |
setTracer(int traceLevel,
String traceStream)
set the tracer using the given level and stream. |
static void |
setTracer(IReporter reporter)
set the trcer with the given reporter |
static void |
startSubprocess(String id)
alert tracer that a new process is beginning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int FATAL
public static final int ERRORS
public static final int WARNINGS
public static final int PROCESS_INFO
public static final int PROCESS_ALL
public static final int ALL
Constructor Detail |
---|
protected Utils()
Method Detail |
---|
public static void setTracer(int traceLevel, String traceStream)
org.eclipse.actf.core.logging.Reporter
. The trace is always an instance of
org.eclipse.actf.core.logging.PrintWriterReporter
.
traceLevel
- -- a level between NONE
and ALL
traceStream
- -- one of stdout, stderr, or filenamepublic static void setTracer(IReporter reporter)
reporter
- -- reporter to be used as tracerpublic static IReporter getTracer()
public static int getTraceLevel()
public static void startSubprocess(String id)
id
- -- process idpublic static void endSubprocess()
startSubprocess(java.lang.String)
public static void println(int level, String str)
level
- -- level of given informationstr
- -- information to be printedpublic static void println(String errorKey, String msg)
errorKey
- - error key as defined by public fields in org.eclipse.actf.core.logging.Reporter
msg
- - messageorg.eclipse.actf.core.logging.IReporter#setSourceID(String)
public static void println(String errorKey, Throwable t)
errorKey
- - error key as defined by public fields in org.eclipse.actf.core.logging.Reporter
t
- - Throwableorg.eclipse.actf.core.logging.IReporter#setSourceID(String)
public static void println(String errorKey, String msg, Throwable t)
errorKey
- - error key as defined by public fields in org.eclipse.actf.core.logging.Reporter
msg
- -messaget
- - Throwableorg.eclipse.actf.core.logging.IReporter#setSourceID(String)
public static void printParams(int level, Object[] params)
level
- -- level at which to printparams
- -- parameters to be printedpublic static String firstCharToUpper(String str)
str
- -- a string
public static String arrayAsString(String[] str)
public static Throwable getRootException(Throwable t)
t
- - throwable
public static String escape(String s)
s
- text to fix
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |