Class AssistedConstructor<T>


  • class AssistedConstructor<T>
    extends java.lang.Object
    Internal respresentation of a constructor annotated with AssistedInject
    • Field Detail

      • constructor

        private final java.lang.reflect.Constructor<T> constructor
      • 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)
      • getAllParameters

        public java.util.List<Parameter> getAllParameters()
        Returns an ordered list of all constructor parameters (both Assisted and Injected).
      • 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:
        toString in class java.lang.Object