Top Fields Constructors Methods
groovy.lang

public Class TracingInterceptor

extends Object
implements Interceptor
Class Inheritance
All Implemented Interfaces
groovy.lang.Interceptor
Imports
java.io.IOException, .PrintWriter, .Writer

Field Summary

Modifier and TypeField and Description
private int
protected Writer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
afterInvoke(Object
receiver object for the called method
object
,
String
name of the called method
methodName
,
Object[]
arguments to the called method
arguments
,
Object
result of the executed method call or result of beforeInvoke if method was not called
result
)

Implements groovy.lang.Interceptor.afterInvoke.

This code is executed after the method is optionally called.
public Object
beforeInvoke(Object
receiver object for the method call
object
,
String
name of the method to call
methodName
,
Object[]
arguments to the method call
arguments
)

Implements groovy.lang.Interceptor.beforeInvoke.

This code is executed before the method is optionally called.
public boolean
public Writer
getWriter()

Returns the writer associated with this interceptor.

private String
public void
setWriter(Writer writer)

Changes the writer associated with this interceptor.

protected void
write(Object object, String methodName, Object[] arguments, final String origin)

protected void
writeInfo(final Class<T> aClass, final String methodName, final Object[] arguments)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indentback to summary
private int indent
writerback to summary
protected Writer writer

Constructor Detail

TracingInterceptorback to summary
public TracingInterceptor()

Method Detail

afterInvokeback to summary
public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result)

Implements groovy.lang.Interceptor.afterInvoke.

Doc from groovy.lang.Interceptor.afterInvoke.

This code is executed after the method is optionally called.

Parameters
object:Object

receiver object for the called method

methodName:String

name of the called method

arguments:Object[]

arguments to the called method

result:Object

result of the executed method call or result of beforeInvoke if method was not called

Returns:Object

any arbitrary result that can replace the result of the original method call. Typically, the result parameter is returned.

beforeInvokeback to summary
public Object beforeInvoke(Object object, String methodName, Object[] arguments)

Implements groovy.lang.Interceptor.beforeInvoke.

Doc from groovy.lang.Interceptor.beforeInvoke.

This code is executed before the method is optionally called.

Parameters
object:Object

receiver object for the method call

methodName:String

name of the method to call

arguments:Object[]

arguments to the method call

Returns:Object

any arbitrary result that replaces the result of the original method call only if doInvoke() returns false and afterInvoke() relays this result.

doInvokeback to summary
public boolean doInvoke()

Implements groovy.lang.Interceptor.doInvoke.

Returns:boolean

Doc from groovy.lang.Interceptor.doInvoke.

whether the target method should be invoked at all.

getWriterback to summary
public Writer getWriter()

Returns the writer associated with this interceptor.

indentback to summary
private String indent()
setWriterback to summary
public void setWriter(Writer writer)

Changes the writer associated with this interceptor.

writeback to summary
protected void write(Object object, String methodName, Object[] arguments, final String origin)
writeInfoback to summary
protected void writeInfo(final Class<T> aClass, final String methodName, final Object[] arguments) throws IOException