@Override public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof SystemInjecteeImpl)) return false; SystemInjecteeImpl other = (SystemInjecteeImpl) o; if (position != other.getPosition()) return false; if (!pClass.equals(other.getInjecteeClass())) return false; return parentIdentifier.equals(other.parentIdentifier); }
@Override public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof SystemInjecteeImpl)) return false; SystemInjecteeImpl other = (SystemInjecteeImpl) o; if (position != other.getPosition()) return false; if (!pClass.equals(other.getInjecteeClass())) return false; return parentIdentifier.equals(other.parentIdentifier); }
@Override public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof SystemInjecteeImpl)) return false; SystemInjecteeImpl other = (SystemInjecteeImpl) o; if (position != other.getPosition()) return false; if (!pClass.equals(other.getInjecteeClass())) return false; return parentIdentifier.equals(other.parentIdentifier); }
@Override public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof SystemInjecteeImpl)) return false; SystemInjecteeImpl other = (SystemInjecteeImpl) o; if (position != other.getPosition()) return false; if (!pClass.equals(other.getInjecteeClass())) return false; return parentIdentifier.equals(other.parentIdentifier); }
/** * Returns an injection resolver for the injectee * * @param locator The locator to use when finding the resolver * @param injectee Injectee from which the annotation should be extracted * @return Injection resolver used to resolve the injection for the injectee * @throws IllegalStateException If we could not find a valid resolver */ public InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, SystemInjecteeImpl injectee) throws IllegalStateException { return getInjectionResolver(locator, injectee.getParent(), injectee.getPosition()); }
/** * Returns an injection resolver for the injectee * * @param locator The locator to use when finding the resolver * @param injectee Injectee from which the annotation should be extracted * @return Injection resolver used to resolve the injection for the injectee * @throws IllegalStateException If we could not find a valid resolver */ public InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, SystemInjecteeImpl injectee) throws IllegalStateException { return getInjectionResolver(locator, injectee.getParent(), injectee.getPosition()); }
/** * Returns an injection resolver for the injectee * * @param locator The locator to use when finding the resolver * @param injectee Injectee from which the annotation should be extracted * @return Injection resolver used to resolve the injection for the injectee * @throws IllegalStateException If we could not find a valid resolver */ public InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, SystemInjecteeImpl injectee) throws IllegalStateException { return getInjectionResolver(locator, injectee.getParent(), injectee.getPosition()); }
/** * Just creates the thing, doesn't try to do anything else * @param createMe The thing to create * @param locator The locator to find the injection points with * @param strategy The strategy to use for analyzing the class * @return The constructed thing, no further injection is performed */ @SuppressWarnings("unchecked") public static <T> T justCreate(Class<T> createMe, ServiceLocatorImpl locator, String strategy) { if (createMe == null) throw new IllegalArgumentException(); Collector collector = new Collector(); ClassAnalyzer analyzer = getClassAnalyzer(locator, strategy, collector); collector.throwIfErrors(); Constructor<?> c = getConstructor(createMe, analyzer, collector); collector.throwIfErrors(); List<SystemInjecteeImpl> injectees = getConstructorInjectees(c, null); validateSelfInjectees(null, injectees, collector); collector.throwIfErrors(); Object args[] = new Object[injectees.size()]; for (SystemInjecteeImpl injectee : injectees) { InjectionResolver<?> resolver = locator.getPerLocatorUtilities().getInjectionResolver(locator, injectee); args[injectee.getPosition()] = resolver.resolve(injectee, null); } try { return (T) ReflectionHelper.makeMe(c, args, locator.getNeutralContextClassLoader()); } catch (Throwable th) { throw new MultiException(th); } }
/** * Just creates the thing, doesn't try to do anything else * @param createMe The thing to create * @param locator The locator to find the injection points with * @param strategy The strategy to use for analyzing the class * @return The constructed thing, no further injection is performed */ @SuppressWarnings("unchecked") public static <T> T justCreate(Class<T> createMe, ServiceLocatorImpl locator, String strategy) { if (createMe == null) throw new IllegalArgumentException(); Collector collector = new Collector(); ClassAnalyzer analyzer = getClassAnalyzer(locator, strategy, collector); collector.throwIfErrors(); Constructor<?> c = getConstructor(createMe, analyzer, collector); collector.throwIfErrors(); List<SystemInjecteeImpl> injectees = getConstructorInjectees(c, null); validateSelfInjectees(null, injectees, collector); collector.throwIfErrors(); Object args[] = new Object[injectees.size()]; for (SystemInjecteeImpl injectee : injectees) { InjectionResolver<?> resolver = locator.getPerLocatorUtilities().getInjectionResolver(locator, injectee); args[injectee.getPosition()] = resolver.resolve(injectee, null); } try { return (T) ReflectionHelper.makeMe(c, args, locator.getNeutralContextClassLoader()); } catch (Throwable th) { throw new MultiException(th); } }
/** * Just creates the thing, doesn't try to do anything else * @param createMe The thing to create * @param locator The locator to find the injection points with * @param strategy The strategy to use for analyzing the class * @return The constructed thing, no further injection is performed */ @SuppressWarnings("unchecked") public static <T> T justCreate(Class<T> createMe, ServiceLocatorImpl locator, String strategy) { if (createMe == null) throw new IllegalArgumentException(); Collector collector = new Collector(); ClassAnalyzer analyzer = getClassAnalyzer(locator, strategy, collector); collector.throwIfErrors(); Constructor<?> c = getConstructor(createMe, analyzer, collector); collector.throwIfErrors(); List<SystemInjecteeImpl> injectees = getConstructorInjectees(c, null); validateSelfInjectees(null, injectees, collector); collector.throwIfErrors(); Object args[] = new Object[injectees.size()]; for (SystemInjecteeImpl injectee : injectees) { InjectionResolver<?> resolver = locator.getPerLocatorUtilities().getInjectionResolver(locator, injectee); args[injectee.getPosition()] = resolver.resolve(injectee, null); } try { return (T) ReflectionHelper.makeMe(c, args, locator.getNeutralContextClassLoader()); } catch (Throwable th) { throw new MultiException(th); } }
/** * Just creates the thing, doesn't try to do anything else * @param createMe The thing to create * @param locator The locator to find the injection points with * @param strategy The strategy to use for analyzing the class * @return The constructed thing, no further injection is performed */ @SuppressWarnings("unchecked") public static <T> T justCreate(Class<T> createMe, ServiceLocatorImpl locator, String strategy) { if (createMe == null) throw new IllegalArgumentException(); Collector collector = new Collector(); ClassAnalyzer analyzer = getClassAnalyzer(locator, strategy, collector); collector.throwIfErrors(); Constructor<?> c = getConstructor(createMe, analyzer, collector); collector.throwIfErrors(); List<SystemInjecteeImpl> injectees = getConstructorInjectees(c, null); validateSelfInjectees(null, injectees, collector); collector.throwIfErrors(); Object args[] = new Object[injectees.size()]; for (SystemInjecteeImpl injectee : injectees) { InjectionResolver<?> resolver = locator.getPerLocatorUtilities().getInjectionResolver(locator, injectee); args[injectee.getPosition()] = resolver.resolve(injectee, null); } try { return (T) ReflectionHelper.makeMe(c, args, locator.getNeutralContextClassLoader()); } catch (Throwable th) { throw new MultiException(th); } }
args[injectee.getPosition()] = resolver.resolve(injectee, null);
args[injectee.getPosition()] = resolver.resolve(injectee, null);
args[injectee.getPosition()] = resolver.resolve(injectee, null);
args[injectee.getPosition()] = resolver.resolve(injectee, null);