@Retention(value=CLASS) @Target(value=METHOD) public @interface Trace
This annotation is intended to be used on methods to log at runtime the execution time.
Since AndroidAnnotations 3.1 log messages contain the method parameter and return values.
All annotation values are optional :
Example :@Trace void doWork() { // ... Do Work ... } @Trace boolean doMoreWork(String someString) { // ... Do more Work ... }This will log these lines :I/TracedMethodActivity( 302): Entering [void doWork() ] I/TracedMethodActivity( 302): Exiting [void doWork() ], duration in ms: 1002 I/TracedMethodActivity( 302): Entering [boolean doMoreWork(someString = Hello World)] I/TracedMethodActivity( 302): Exiting [boolean doMoreWork(String) returning: true], duration in ms: 651
Modifier and Type | Fields and Description |
---|---|
static String |
DEFAULT_TAG
The string indicating that no tag was given for the log message.
|
Copyright © 2010-2015. All Rights Reserved.