Class StreamTracer
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.AbstractWriter
-
- net.ssehub.easy.instantiation.core.model.expressions.StreamTracer
-
- net.ssehub.easy.instantiation.core.model.common.StreamTracer
-
- Direct Known Subclasses:
StreamTracer,StreamTracer
public abstract class StreamTracer extends StreamTracer implements ITracer
Implements a simple stream-based execution tracer. Produces normalized sequences of collections in order to facilitate easy comparison.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private booleanenabled-
Fields inherited from class net.ssehub.easy.instantiation.core.model.expressions.StreamTracer
NORMALIZER
-
-
Constructor Summary
Constructors Constructor Description StreamTracer(java.io.Writer out, java.lang.String... baseFolder)Creates a new stream tracer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenable(boolean enable)Enables or disables the tracer.protected booleanisEnabled()Returns whether this tracer is enabled.protected voidprintValueDefined(VariableDeclaration var, FieldDescriptor field, java.lang.Object value)Is prints a value definition.voidtrace(java.lang.String text)Emits a trace string.voidtraceError(java.lang.String text)Emits an error trace string.voidtraceExecutionException(VilException exception)Traces a top-level execution exception, i.e., execution a VIL script or template failed.voidtraceWarning(java.lang.String text)Emits a warning trace string.voidvalueDefined(VariableDeclaration var, FieldDescriptor field, java.lang.Object value)Is called when a value of a variable is defined.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.StreamTracer
failedAt, getLocale, getRuntimeEnvironment, getWriter, makeRelative, makeRelative, makeRelative, setLocale, setRuntimeEnvironment, visitedCallExpression, visitingCallExpression
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.AbstractWriter
decreaseIndentation, flush, getOut, increaseIndentation, print, print, print, print, printIndentation, printJavaEscaped, println, println, println, println, println, printWhitespace, setIndentation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.common.ITracer
getTraceFilter, setTraceFilter
-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.expressions.ITracer
failedAt, getLocale, getRuntimeEnvironment, setLocale, setRuntimeEnvironment, visitedCallExpression, visitingCallExpression
-
-
-
-
Method Detail
-
trace
public void trace(java.lang.String text)
Description copied from interface:ITracerEmits a trace string.
-
traceError
public void traceError(java.lang.String text)
Description copied from interface:ITracerEmits an error trace string.- Specified by:
traceErrorin interfaceITracer- Parameters:
text- the text to be emitted
-
traceWarning
public void traceWarning(java.lang.String text)
Description copied from interface:ITracerEmits a warning trace string.- Specified by:
traceWarningin interfaceITracer- Parameters:
text- the text to be emitted
-
valueDefined
public void valueDefined(VariableDeclaration var, FieldDescriptor field, java.lang.Object value)
Description copied from interface:ITracerIs called when a value of a variable is defined.- Specified by:
valueDefinedin interfaceITracer- Parameters:
var- the modified variablefield- the field invar, may be nullvalue- the actual value
-
printValueDefined
protected void printValueDefined(VariableDeclaration var, FieldDescriptor field, java.lang.Object value)
Is prints a value definition.- Parameters:
var- the modified variablefield- the field invar, may be nullvalue- the actual value
-
traceExecutionException
public void traceExecutionException(VilException exception)
Description copied from interface:ITracerTraces a top-level execution exception, i.e., execution a VIL script or template failed.- Specified by:
traceExecutionExceptionin interfaceITracer- Parameters:
exception- the exception
-
isEnabled
protected boolean isEnabled()
Returns whether this tracer is enabled.- Returns:
truefor enabled,falseelse
-
-