|
Tracing Methods
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] Tracing MethodsTracing non api methods is possible using MOTL. Entry and/or exit of methods can be traced.
Method Entry
// this example shows how to trace
// non-generated method entry
@SuppressWarnings("deprecation")
class JavaMethod
{
trace method();
int method( int x ) {
x += 5;
return x;
}
}
Load the above code into UmpleOnline Method Exit
// this example shows how to trace generated
// method exit. In case of methods with a return
// statement, trace code is injected before
// the return
@SuppressWarnings("deprecation")
class JavaMethod
{
trace exit method();
int method( int x ) {
x += 5;
return x;
}
}
Load the above code into UmpleOnline SyntaxtraceDirective : trace [[Prefix]]? [[traceEntity]] [[Postfix]] ; |