Package com.google.inject.internal
Class ProxyFactory<T>
- java.lang.Object
-
- com.google.inject.internal.ProxyFactory<T>
-
- All Implemented Interfaces:
ConstructionProxyFactory<T>
final class ProxyFactory<T> extends java.lang.Object implements ConstructionProxyFactory<T>
Builds a construction proxy that can participate in AOP. This class manages applying type and method matchers to come up with the set of intercepted methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ProxyFactory.ProxyConstructor<T>
Constructs instances that participate in AOP.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.InvocationHandler[]
callbacks
private java.util.function.Function<java.lang.String,java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object>>
enhancer
private InjectionPoint
injectionPoint
private com.google.common.collect.ImmutableMap<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>>
interceptors
private static java.util.logging.Logger
logger
-
Constructor Summary
Constructors Constructor Description ProxyFactory(InjectionPoint injectionPoint, java.lang.Iterable<MethodAspect> methodAspects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstructionProxy<T>
create()
Gets a construction proxy for the given constructor.com.google.common.collect.ImmutableMap<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>>
getInterceptors()
Returns the interceptors that apply to the constructed type.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
injectionPoint
private final InjectionPoint injectionPoint
-
enhancer
private final java.util.function.Function<java.lang.String,java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object>> enhancer
-
interceptors
private final com.google.common.collect.ImmutableMap<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>> interceptors
-
callbacks
private final java.lang.reflect.InvocationHandler[] callbacks
-
-
Constructor Detail
-
ProxyFactory
ProxyFactory(InjectionPoint injectionPoint, java.lang.Iterable<MethodAspect> methodAspects) throws ErrorsException
- Throws:
ErrorsException
-
-
Method Detail
-
getInterceptors
public com.google.common.collect.ImmutableMap<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>> getInterceptors()
Returns the interceptors that apply to the constructed type.
-
create
public ConstructionProxy<T> create() throws ErrorsException
Description copied from interface:ConstructionProxyFactory
Gets a construction proxy for the given constructor.- Specified by:
create
in interfaceConstructionProxyFactory<T>
- Throws:
ErrorsException
-
-