/** * Returns a new injection point for the specified method of {@code type}. This is useful for * extensions that need to build dependency graphs from arbitrary methods. * * @param method any single method present on {@code type}. * @param type the concrete type that defines {@code method}. * @since 4.0 */ public static <T> InjectionPoint forMethod(Method method, TypeLiteral<T> type) { return new InjectionPoint(type, method, false); }
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, field, optional); } }
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, method, optional); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor of {@code type}. * * @param constructor any single constructor present on {@code type}. * @param type the concrete type that defines {@code constructor}. * @since 3.0 */ public static <T> InjectionPoint forConstructor( Constructor<T> constructor, TypeLiteral<? extends T> type) { if (type.getRawType() != constructor.getDeclaringClass()) { new Errors(type) .constructorNotDefinedByType(constructor, type) .throwConfigurationExceptionIfErrorsExist(); } return new InjectionPoint(type, constructor); }
return new InjectionPoint(type, injectableConstructor); return new InjectionPoint(type, noArgConstructor); } catch (NoSuchMethodException e) { errors.missingConstructor(rawType);
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, field, optional); } }
/** * Returns a new injection point for the specified method of {@code type}. * This is useful for extensions that need to build dependency graphs from * arbitrary methods. * * @param method any single method present on {@code type}. * @param type the concrete type that defines {@code method}. */ public static <T> InjectionPoint forMethod(Method method, TypeLiteral<T> type) { return new InjectionPoint(type, method, false); }
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, field, optional); } }
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, field, optional); } }
/** * Returns a new injection point for the specified method of {@code type}. This is useful for * extensions that need to build dependency graphs from arbitrary methods. * * @param method any single method present on {@code type}. * @param type the concrete type that defines {@code method}. * @since 4.0 */ public static <T> InjectionPoint forMethod(Method method, TypeLiteral<T> type) { return new InjectionPoint(type, method, false); }
/** * Returns a new injection point for the specified method of {@code type}. This is useful for * extensions that need to build dependency graphs from arbitrary methods. * * @param method any single method present on {@code type}. * @param type the concrete type that defines {@code method}. * @since 4.0 */ public static <T> InjectionPoint forMethod(Method method, TypeLiteral<T> type) { return new InjectionPoint(type, method, false); }
InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, field, optional); } }
@Override InjectionPoint toInjectionPoint() { return new InjectionPoint(declaringType, method, optional); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }
/** * Returns a new injection point for the specified constructor. If the declaring type of {@code * constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a * type literal. * * @param constructor any single constructor present on {@code type}. * * @since 3.0 */ public static <T> InjectionPoint forConstructor(Constructor<T> constructor) { return new InjectionPoint(TypeLiteral.get(constructor.getDeclaringClass()), constructor); }