Interface ITracer
-
- All Known Implementing Classes:
AbstractVilTracer,NoTracer,StreamTracer,StreamVilTracer,VilTracer
public interface ITracer extends ITracer
A simple tracer interface providing test support to the execution part.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<java.lang.Object>adjustSequenceForJoin(Collection<java.lang.Object> collection)Allows a tracer to change the sequence of processing a map collection.Collection<?>adjustSequenceForMap(Collection<?> collection)Allows a tracer to change the sequence of processing a map collection.voidfailedAt(IBuildlangElement element)Is called when the execution of a build language element failed.voidreset()Resets this tracer for reuse.voidvisitAlternative(boolean takeIf)An alternative was visited.voidvisitedInstantiator(java.lang.String name, java.lang.Object result)Is called when an instantiator was visited / executed.voidvisitedLoop(IEnumeratingLoop loop, RuntimeEnvironment<?,?> environment)Is called when visiting a map ends.voidvisitedRule(Rule rule, RuntimeEnvironment<?,?> environment, java.lang.Object result)Is called when visiting a rule ends.voidvisitedScript(Script script)Is called when visiting a script ends.voidvisitedWhileBody()Is called when visiting a while body ends.voidvisitingInstantiator(java.lang.String name)Is called when an instantiator is being visited / executed.voidvisitIteratorAssignment(IEnumeratingLoop loop, VariableDeclaration var, java.lang.Object value)Is called when a loop iterator variable is assigned.voidvisitLoop(IEnumeratingLoop loop, RuntimeEnvironment<?,?> environment)Is called when visiting a map starts.voidvisitRule(Rule rule, RuntimeEnvironment<?,?> environment)Is called when visiting a rule starts.voidvisitScript(Script script, RuntimeEnvironment<?,?> environment)Is called when a script (header) is being visited.voidvisitScriptBody(Script script, RuntimeEnvironment<?,?> environment)Is called when a script (body) is being visited.voidvisitSystemCall(java.lang.String[] args)Is called before executing a system call.voidvisitWhileBody()Is called when visiting a while body starts.-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.common.ITracer
enable, trace, traceError, traceExecutionException, traceWarning, valueDefined
-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.expressions.ITracer
failedAt, getLocale, getRuntimeEnvironment, setLocale, setRuntimeEnvironment, visitedCallExpression, visitingCallExpression
-
-
-
-
Method Detail
-
visitScript
void visitScript(Script script, RuntimeEnvironment<?,?> environment)
Is called when a script (header) is being visited.- Parameters:
script- the scriptenvironment- the runtime environment
-
visitScriptBody
void visitScriptBody(Script script, RuntimeEnvironment<?,?> environment)
Is called when a script (body) is being visited.- Parameters:
script- the scriptenvironment- the runtime environment
-
visitedScript
void visitedScript(Script script)
Is called when visiting a script ends.- Parameters:
script- the script
-
visitRule
void visitRule(Rule rule, RuntimeEnvironment<?,?> environment)
Is called when visiting a rule starts.- Parameters:
rule- the rule being visitedenvironment- the runtime environment
-
visitedRule
void visitedRule(Rule rule, RuntimeEnvironment<?,?> environment, java.lang.Object result)
Is called when visiting a rule ends.- Parameters:
rule- the rule being visitedenvironment- the runtime environmentresult- the result produced by the rule
-
visitLoop
void visitLoop(IEnumeratingLoop loop, RuntimeEnvironment<?,?> environment)
Is called when visiting a map starts.- Parameters:
loop- the loop being visitedenvironment- the runtime environment
-
visitIteratorAssignment
void visitIteratorAssignment(IEnumeratingLoop loop, VariableDeclaration var, java.lang.Object value)
Is called when a loop iterator variable is assigned.- Parameters:
loop- the loopvar- the iterator variablevalue- the actual value
-
visitedLoop
void visitedLoop(IEnumeratingLoop loop, RuntimeEnvironment<?,?> environment)
Is called when visiting a map ends.- Parameters:
loop- the loop being visitedenvironment- the runtime environment
-
adjustSequenceForMap
Collection<?> adjustSequenceForMap(Collection<?> collection)
Allows a tracer to change the sequence of processing a map collection. This is intended for testing and debugging only as it normalizes and, thus, interfers with the actual execution sequence.- Parameters:
collection- the collection to be considered- Returns:
- the new sequence (just the elements may be reordered)
-
adjustSequenceForJoin
Collection<java.lang.Object> adjustSequenceForJoin(Collection<java.lang.Object> collection)
Allows a tracer to change the sequence of processing a map collection. This is intended for testing and debugging only as it normalizes and, thus, interfers with the actual execution sequence.- Parameters:
collection- the collection to be considered- Returns:
- the new sequence (just the elements may be reordered)
-
visitSystemCall
void visitSystemCall(java.lang.String[] args)
Is called before executing a system call.- Parameters:
args- the arguments for the system call
-
visitingInstantiator
void visitingInstantiator(java.lang.String name)
Is called when an instantiator is being visited / executed.- Parameters:
name- the name of the instantiator
-
visitedInstantiator
void visitedInstantiator(java.lang.String name, java.lang.Object result)Is called when an instantiator was visited / executed.- Parameters:
name- the name of the instantiatorresult- the result of the execution
-
visitAlternative
void visitAlternative(boolean takeIf)
An alternative was visited.- Parameters:
takeIf- iftruethe if-branch is used,falseelse the else-branch
-
failedAt
void failedAt(IBuildlangElement element)
Is called when the execution of a build language element failed.- Parameters:
element- the failed element
-
reset
void reset()
Resets this tracer for reuse.
-
visitWhileBody
void visitWhileBody()
Is called when visiting a while body starts.
-
visitedWhileBody
void visitedWhileBody()
Is called when visiting a while body ends.
-
-