com.thoughtworks.proxy.toys.echo
Class Echoing

java.lang.Object
  extended by com.thoughtworks.proxy.toys.echo.Echoing

public class Echoing
extends Object

Factory for echoing proxy instances.

The Echoing toy acts as a decorator where every method invocation is written to a PrintWriter first.

Since:
0.1
Author:
Dan North, Jörg Schaible
See Also:
com.thoughtworks.proxy.toys.echo

Method Summary
static Object object(Class type)
          Create a echoing proxy for a type and use system error channel to report.
static Object object(Class type, Object impl)
          Create a echoing proxy for a type that delegates to an object and use system error channel to report.
static Object object(Class type, Object impl, PrintWriter out)
          Create a echoing proxy for a type that delegates to an object and report to a given PrintWriter.
static Object object(Class type, Object impl, PrintWriter out, ProxyFactory factory)
          Create a echoing proxy for a type that delegates to an object and use a special ProxyFactory implementation as well as reports to a given PrintWriter.
static Object object(Class type, Object impl, ProxyFactory factory)
          Create a echoing proxy for a type that delegates to an object and use a special ProxyFactory implementation as well as the system error channel to report.
static Object object(Class type, PrintWriter out)
          Create a echoing proxy for a type and report to a given PrintWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

object

public static Object object(Class type)
Create a echoing proxy for a type and use system error channel to report.

Parameters:
type - the proxied type
Returns:
the generated proxy
Since:
0.1

object

public static Object object(Class type,
                            PrintWriter out)
Create a echoing proxy for a type and report to a given PrintWriter.

Parameters:
type - the proxied type
out - the PrintWriter receiving the output
Returns:
the generated proxy
Since:
0.1

object

public static Object object(Class type,
                            Object impl)
Create a echoing proxy for a type that delegates to an object and use system error channel to report.

Parameters:
type - the proxied type
impl - the delegated object
Returns:
the generated proxy
Since:
0.1

object

public static Object object(Class type,
                            Object impl,
                            ProxyFactory factory)
Create a echoing proxy for a type that delegates to an object and use a special ProxyFactory implementation as well as the system error channel to report.

Parameters:
type - the proxied type
impl - the delegated object
factory - the ProxyFactory to use
Returns:
the generated proxy
Since:
0.2

object

public static Object object(Class type,
                            Object impl,
                            PrintWriter out)
Create a echoing proxy for a type that delegates to an object and report to a given PrintWriter.

Parameters:
type - the proxied type
impl - the delegated object
out - the PrintWriter receiving the output
Returns:
the generated proxy
Since:
0.1

object

public static Object object(Class type,
                            Object impl,
                            PrintWriter out,
                            ProxyFactory factory)
Create a echoing proxy for a type that delegates to an object and use a special ProxyFactory implementation as well as reports to a given PrintWriter.

Parameters:
type - the proxied type
impl - the delegated object
out - the PrintWriter receiving the output
factory - the ProxyFactory to use
Returns:
the generated proxy
Since:
0.1