private InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, AnnotatedElement annotatedGuy, int position) throws IllegalStateException { boolean methodOrConstructor = annotatedGuy instanceof Method || annotatedGuy instanceof Constructor<?>; Annotation injectAnnotation = getInjectAnnotation(locator, annotatedGuy, methodOrConstructor, position); //Annotation injectAnnotation = getInjectAnnotation(locator, annotatedGuy, position); Class<? extends Annotation> injectType = (injectAnnotation == null) ? Inject.class : injectAnnotation.annotationType(); InjectionResolver<?> retVal = locator.getInjectionResolver(injectType); if (retVal == null) { // Not possible to get here, we only are here if we already found a resolver throw new IllegalStateException("There is no installed injection resolver for " + Pretty.clazz(injectType) + " for type " + annotatedGuy); } return retVal; }
@Override public InjectionResolver<?> compute(SystemInjecteeImpl key) { return perLocatorUtilities.getInjectionResolver(getMe(), key); }
/* package */ boolean hasInjectAnnotation(AnnotatedElement annotated) { return perLocatorUtilities.hasInjectAnnotation(annotated); }
public void shutdown() { releaseCaches(); threadLocalAutoAnalyzerNameCache.removeAll(); threadLocalAnnotationCache.removeAll(); }
/** * Creates a constant active descriptor with the given locator ID * * @param theOne the object to create it from * @param locatorId The id of the locator this is being created for */ public ConstantActiveDescriptor(T theOne, ServiceLocatorImpl locator) { super(new HashSet<Type>(), PerLookup.class, null, new HashSet<Annotation>(), DescriptorType.CLASS, DescriptorVisibility.NORMAL, 0, null, null, locator.getPerLocatorUtilities().getAutoAnalyzerName(theOne.getClass()), null); this.theOne = theOne; this.locatorId = locator.getLocatorId(); }
final boolean checkParams, final int position) { final AnnotatedElementAnnotationInfo annotationInfo = computeElementAnnotationInfo(annotated);
return locator.getPerLocatorUtilities().getProxyUtilities().generateProxy(requestedClass, locator, root, (ServiceHandleImpl<T>) handle, injectee);
classReflectionHelper.dispose(); contextCache.clear(); perLocatorUtilities.shutdown();
public void shutdown() { releaseCaches(); threadLocalAutoAnalyzerNameCache.removeAll(); threadLocalAnnotationCache.removeAll(); }
/** * Creates a constant active descriptor with the given locator * * @param theOne the object to create it from * @param locator the locator this is being created for */ public ConstantActiveDescriptor(T theOne, ServiceLocatorImpl locator) { super(new HashSet<Type>(), PerLookup.class, null, new HashSet<Annotation>(), DescriptorType.CLASS, DescriptorVisibility.NORMAL, 0, null, null, locator.getPerLocatorUtilities().getAutoAnalyzerName(theOne.getClass()), null); this.theOne = theOne; this.locatorId = locator.getLocatorId(); }
final boolean checkParams, final int position) { final AnnotatedElementAnnotationInfo annotationInfo = computeElementAnnotationInfo(annotated);
return locator.getPerLocatorUtilities().getProxyUtilities().generateProxy(requestedClass, locator, root, (ServiceHandleImpl<T>) handle, injectee);
classReflectionHelper.dispose(); contextCache.clear(); perLocatorUtilities.shutdown();
@Override public InjectionResolver<?> compute(SystemInjecteeImpl key) { return perLocatorUtilities.getInjectionResolver(getMe(), key); }
public void shutdown() { releaseCaches(); threadLocalAutoAnalyzerNameCache.removeAll(); threadLocalAnnotationCache.removeAll(); }
/** * Creates a constant active descriptor with the given locator ID * * @param theOne the object to create it from * @param locatorId The id of the locator this is being created for */ public ConstantActiveDescriptor(T theOne, ServiceLocatorImpl locator) { super(new HashSet<Type>(), PerLookup.class, null, new HashSet<Annotation>(), DescriptorType.CLASS, DescriptorVisibility.NORMAL, 0, null, null, locator.getPerLocatorUtilities().getAutoAnalyzerName(theOne.getClass()), null); this.theOne = theOne; this.locatorId = locator.getLocatorId(); }
/* package */ boolean hasInjectAnnotation(AnnotatedElement annotated) { return perLocatorUtilities.hasInjectAnnotation(annotated); }
private InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, AnnotatedElement annotatedGuy, int position) throws IllegalStateException { boolean methodOrConstructor = annotatedGuy instanceof Method || annotatedGuy instanceof Constructor<?>; Annotation injectAnnotation = getInjectAnnotation(locator, annotatedGuy, methodOrConstructor, position); //Annotation injectAnnotation = getInjectAnnotation(locator, annotatedGuy, position); Class<? extends Annotation> injectType = (injectAnnotation == null) ? Inject.class : injectAnnotation.annotationType(); InjectionResolver<?> retVal = locator.getInjectionResolver(injectType); if (retVal == null) { // Not possible to get here, we only are here if we already found a resolver throw new IllegalStateException("There is no installed injection resolver for " + Pretty.clazz(injectType) + " for type " + annotatedGuy); } return retVal; }
final boolean checkParams, final int position) { final AnnotatedElementAnnotationInfo annotationInfo = computeElementAnnotationInfo(annotated);
return locator.getPerLocatorUtilities().getProxyUtilities().generateProxy(requestedClass, locator, root, (ServiceHandleImpl<T>) handle, injectee);