public interface MethodMonitor
Modifier and Type | Method and Description |
---|---|
void |
clear()
Provided for MethodMonitor instances that maintain state.
|
java.util.Collection<MethodMonitor> |
contents()
Returns the contents of this method monitor.
|
void |
enter(int ident,
java.lang.Object... args)
Invoked at the start of a method, before any actions in the method
take place.
|
void |
exception(int ident,
java.lang.Throwable thr)
Called to report an exception that is thrown in the method.
|
void |
exit(int ident)
An exit from a method that has a void return type.
|
void |
exit(int ident,
java.lang.Object result)
An exit from a method that has a non-void return type.
|
MethodMonitorFactory |
factory()
Factory used to create this MethodMonitor
Note: is is required that this.factory().create(myClass()).equals( this )
for any MethodMonitor.
|
void |
info(java.lang.Object[] args,
int callerIdent,
int selfIdent)
Invoked anywhere in the method after enter and before exit, to indicate
some useful tracing information in the method.
|
java.lang.Class<?> |
myClass()
The class for which this MethodMonitor is defined.
|
java.lang.String |
name() |
java.lang.Class<?> myClass()
void enter(int ident, java.lang.Object... args)
ident
- The method identifier.args
- The arguments passed into the method.void info(java.lang.Object[] args, int callerIdent, int selfIdent)
callerIdent
- The identifier of the method calling the InfoMethod.selfIdent
- The identifier of the InfoMethod itself.args
- Any information needed in the info call.void exit(int ident)
ident
- The method identifier.void exit(int ident, java.lang.Object result)
ident
- The method identifier.result
- The method result.void exception(int ident, java.lang.Throwable thr)
ident
- The method identifier.thr
- The exception that terminates the method.void clear()
java.util.Collection<MethodMonitor> contents()
MethodMonitorFactory factory()
java.lang.String name()