Package com.google.inject.assistedinject
Class AssistedConstructor<T>
- java.lang.Object
-
- com.google.inject.assistedinject.AssistedConstructor<T>
-
class AssistedConstructor<T> extends java.lang.ObjectInternal respresentation of a constructor annotated withAssistedInject
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Parameter>allParametersprivate ParameterListKeyassistedParametersprivate java.lang.reflect.Constructor<T>constructor
-
Constructor Summary
Constructors Modifier Constructor Description privateAssistedConstructor(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> AssistedConstructor<T>create(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)java.util.List<Parameter>getAllParameters()ParameterListKeygetAssistedParameters()Returns theParameterListKeyfor this constructor.java.util.Set<java.lang.Class<?>>getDeclaredExceptions()TnewInstance(java.lang.Object[] args)Returns an instance of T, constructed using this constructor, with the supplied arguments.java.lang.StringtoString()
-
-
-
Field Detail
-
constructor
private final java.lang.reflect.Constructor<T> constructor
-
assistedParameters
private final ParameterListKey assistedParameters
-
allParameters
private final java.util.List<Parameter> allParameters
-
-
Constructor Detail
-
AssistedConstructor
private AssistedConstructor(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)
-
-
Method Detail
-
create
public static <T> AssistedConstructor<T> create(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)
-
getAssistedParameters
public ParameterListKey getAssistedParameters()
Returns theParameterListKeyfor this constructor. TheParameterListKeyis created from the ordered list ofAssistedconstructor parameters.
-
getAllParameters
public java.util.List<Parameter> getAllParameters()
-
getDeclaredExceptions
public java.util.Set<java.lang.Class<?>> getDeclaredExceptions()
-
newInstance
public T newInstance(java.lang.Object[] args) throws java.lang.Throwable
Returns an instance of T, constructed using this constructor, with the supplied arguments.- Throws:
java.lang.Throwable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-