Top Description Inners Fields Constructors Methods
com.google.inject.internal

pack-priv final Class DefaultConstructionProxyFactory<T>

extends Object
implements ConstructionProxyFactory<T>
Class Inheritance
All Implemented Interfaces
com.google.inject.internal.ConstructionProxyFactory
Imports
com.google.common.collect.ImmutableMap, com.google.inject.spi.InjectionPoint, java.lang.reflect.Constructor, .InvocationTargetException, .Method, .Modifier, java.util.List, java.util.function.BiFunction, org.aopalliance.intercept.MethodInterceptor

Produces construction proxies that invoke the class constructor.
Author
[email protected] (Bob Lee)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
DefaultConstructionProxyFactory.FastClassProxy<T>

A ConstructionProxy that uses bytecode generation to invoke the constructor.

private static class

Field Summary

Modifier and TypeField and Description
private final InjectionPoint

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultConstructionProxyFactory(InjectionPoint
an injection point whose member is a constructor of T.
injectionPoint
)

Method Summary

Modifier and TypeMethod and Description
public ConstructionProxy<T>
create()

Implements com.google.inject.internal.ConstructionProxyFactory.create.

Gets a construction proxy for the given constructor.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

injectionPointback to summary
private final InjectionPoint injectionPoint

Constructor Detail

DefaultConstructionProxyFactoryback to summary
pack-priv DefaultConstructionProxyFactory(InjectionPoint injectionPoint)
Parameters
injectionPoint:InjectionPoint

an injection point whose member is a constructor of T.

Method Detail

createback to summary
public ConstructionProxy<T> create()

Implements com.google.inject.internal.ConstructionProxyFactory.create.

Doc from com.google.inject.internal.ConstructionProxyFactory.create.

Gets a construction proxy for the given constructor.

Annotations
@Override
com.google.inject.internal back to summary

private final Class DefaultConstructionProxyFactory.FastClassProxy<T>

extends Object
implements ConstructionProxy<T>
Class Inheritance
  • java.lang.Object
  • com.google.inject.internal.DefaultConstructionProxyFactory.FastClassProxy
All Implemented Interfaces
com.google.inject.internal.ConstructionProxy

A ConstructionProxy that uses bytecode generation to invoke the constructor.

Field Summary

Modifier and TypeField and Description
pack-priv final Constructor<T>
pack-priv final BiFunction<Object, Object[], Object>
pack-priv final InjectionPoint

Constructor Summary

AccessConstructor and Description
pack-priv
FastClassProxy(InjectionPoint injectionPoint, Constructor<T> constructor, BiFunction<Object, Object[], Object> fastConstructor)

Method Summary

Modifier and TypeMethod and Description
public Constructor<T>
getConstructor()

Implements com.google.inject.internal.ConstructionProxy.getConstructor.

Returns the injected constructor.
public InjectionPoint
getInjectionPoint()

Implements com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Returns the injection point for this constructor.
public ImmutableMap<Method, List<MethodInterceptor>>
getMethodInterceptors()

Implements com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Returns the interceptors applied to each method, in order of invocation.
public T
newInstance(Object... arguments)

Implements com.google.inject.internal.ConstructionProxy.newInstance.

Constructs an instance of T for the given arguments.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constructorback to summary
pack-priv final Constructor<T> constructor
fastConstructorback to summary
pack-priv final BiFunction<Object, Object[], Object> fastConstructor
injectionPointback to summary
pack-priv final InjectionPoint injectionPoint

Constructor Detail

FastClassProxyback to summary
pack-priv FastClassProxy(InjectionPoint injectionPoint, Constructor<T> constructor, BiFunction<Object, Object[], Object> fastConstructor)

Method Detail

getConstructorback to summary
public Constructor<T> getConstructor()

Implements com.google.inject.internal.ConstructionProxy.getConstructor.

Doc from com.google.inject.internal.ConstructionProxy.getConstructor.

Returns the injected constructor. If the injected constructor is synthetic (such as generated code for method interception), the natural constructor is returned.

Annotations
@Override
getInjectionPointback to summary
public InjectionPoint getInjectionPoint()

Implements com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Doc from com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Returns the injection point for this constructor.

Annotations
@Override
getMethodInterceptorsback to summary
public ImmutableMap<Method, List<MethodInterceptor>> getMethodInterceptors()

Implements com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Doc from com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Returns the interceptors applied to each method, in order of invocation.

Annotations
@Override
newInstanceback to summary
public T newInstance(Object... arguments) throws InvocationTargetException

Implements com.google.inject.internal.ConstructionProxy.newInstance.

Doc from com.google.inject.internal.ConstructionProxy.newInstance.

Constructs an instance of T for the given arguments.

Annotations
@Override
@SuppressWarnings:unchecked
com.google.inject.internal back to summary

private final Class DefaultConstructionProxyFactory.ReflectiveProxy<T>

extends Object
implements ConstructionProxy<T>
Class Inheritance
  • java.lang.Object
  • com.google.inject.internal.DefaultConstructionProxyFactory.ReflectiveProxy
All Implemented Interfaces
com.google.inject.internal.ConstructionProxy

Field Summary

Modifier and TypeField and Description
pack-priv final Constructor<T>
pack-priv final InjectionPoint

Constructor Summary

AccessConstructor and Description
pack-priv
ReflectiveProxy(InjectionPoint injectionPoint, Constructor<T> constructor)

Method Summary

Modifier and TypeMethod and Description
public Constructor<T>
getConstructor()

Implements com.google.inject.internal.ConstructionProxy.getConstructor.

Returns the injected constructor.
public InjectionPoint
getInjectionPoint()

Implements com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Returns the injection point for this constructor.
public ImmutableMap<Method, List<MethodInterceptor>>
getMethodInterceptors()

Implements com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Returns the interceptors applied to each method, in order of invocation.
public T
newInstance(Object... arguments)

Implements com.google.inject.internal.ConstructionProxy.newInstance.

Constructs an instance of T for the given arguments.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constructorback to summary
pack-priv final Constructor<T> constructor
injectionPointback to summary
pack-priv final InjectionPoint injectionPoint

Constructor Detail

ReflectiveProxyback to summary
pack-priv ReflectiveProxy(InjectionPoint injectionPoint, Constructor<T> constructor)

Method Detail

getConstructorback to summary
public Constructor<T> getConstructor()

Implements com.google.inject.internal.ConstructionProxy.getConstructor.

Doc from com.google.inject.internal.ConstructionProxy.getConstructor.

Returns the injected constructor. If the injected constructor is synthetic (such as generated code for method interception), the natural constructor is returned.

Annotations
@Override
getInjectionPointback to summary
public InjectionPoint getInjectionPoint()

Implements com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Doc from com.google.inject.internal.ConstructionProxy.getInjectionPoint.

Returns the injection point for this constructor.

Annotations
@Override
getMethodInterceptorsback to summary
public ImmutableMap<Method, List<MethodInterceptor>> getMethodInterceptors()

Implements com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Doc from com.google.inject.internal.ConstructionProxy.getMethodInterceptors.

Returns the interceptors applied to each method, in order of invocation.

Annotations
@Override
newInstanceback to summary
public T newInstance(Object... arguments) throws InvocationTargetException

Implements com.google.inject.internal.ConstructionProxy.newInstance.

Doc from com.google.inject.internal.ConstructionProxy.newInstance.

Constructs an instance of T for the given arguments.

Annotations
@Override