com.google.inject.intercept
Class ProxyFactory

java.lang.Object
  extended by com.google.inject.intercept.ProxyFactory
All Implemented Interfaces:
ConstructionProxyFactory

public class ProxyFactory
extends java.lang.Object
implements ConstructionProxyFactory

Proxies classes applying interceptors to methods as specified in ProxyFactoryBuilder.

Author:
crazybob@google.com (Bob Lee)

Method Summary
<T> ConstructionProxy<T>
get(java.lang.reflect.Constructor<T> constructor)
          Gets a construction proxy for the given constructor.
<T> Factory<T>
getFactory(java.lang.Class<T> type)
          Gets a factory for the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFactory

public <T> Factory<T> getFactory(java.lang.Class<T> type)
                      throws java.lang.NoSuchMethodException
Gets a factory for the given type. Uses the zero-arg constructor. Wraps exceptions in RuntimeException including InvocationTargetException.

Throws:
java.lang.NoSuchMethodException

get

public <T> ConstructionProxy<T> get(java.lang.reflect.Constructor<T> constructor)
Description copied from interface: ConstructionProxyFactory
Gets a construction proxy for the given constructor.

Specified by:
get in interface ConstructionProxyFactory