public <T extends Annotation> T getAnnotation(Class<T> annotationType) { AnnotatedElement annotated = getUnsatisfiedElement(); if (annotated!=null) { return annotated.getAnnotation(annotationType); } else { return null; } } }
protected void error_injectionException(InjectionResolver target, Annotation inject, AnnotatedElement injectionPoint, Throwable e) { Logger.getAnonymousLogger().log(Level.FINE, "** Injection failure **", e); if (UnsatisfiedDependencyException.class.isInstance(e)) { if (injectionPoint == ((UnsatisfiedDependencyException)e).getUnsatisfiedElement()) { // no need to wrap again throw (UnsatisfiedDependencyException)e; } if (target.isOptional(injectionPoint, inject)) { return; } else { throw new UnsatisfiedDependencyException(injectionPoint, inject, e); } } if (null != e.getCause() && InvocationTargetException.class.isInstance(e)) { e = e.getCause(); } throw new MultiException(e); }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { AnnotatedElement annotated = getUnsatisfiedElement(); if (annotated!=null) { return annotated.getAnnotation(annotationType); } else { return null; } } }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { AnnotatedElement annotated = getUnsatisfiedElement(); if (annotated!=null) { return annotated.getAnnotation(annotationType); } else { return null; } } }
protected void error_injectionException(InjectionResolver target, Annotation inject, AnnotatedElement injectionPoint, Throwable e) { Logger.getAnonymousLogger().log(Level.FINE, "** Injection failure **", e); if (UnsatisfiedDependencyException.class.isInstance(e)) { if (injectionPoint == ((UnsatisfiedDependencyException)e).getUnsatisfiedElement()) { // no need to wrap again throw (UnsatisfiedDependencyException)e; } if (target.isOptional(injectionPoint, inject)) { return; } else { throw new UnsatisfiedDependencyException(injectionPoint, inject, e); } } if (null != e.getCause() && InvocationTargetException.class.isInstance(e)) { e = e.getCause(); } throw new MultiException(e); }
protected void error_injectionException(InjectionResolver target, Annotation inject, AnnotatedElement injectionPoint, Throwable e) { Logger.getAnonymousLogger().log(Level.FINE, "** Injection failure **", e); if (UnsatisfiedDependencyException.class.isInstance(e)) { if (injectionPoint == ((UnsatisfiedDependencyException)e).getUnsatisfiedElement()) { // no need to wrap again throw (UnsatisfiedDependencyException)e; } if (target.isOptional(injectionPoint, inject)) { return; } else { throw new UnsatisfiedDependencyException(injectionPoint, inject, e); } } if (null != e.getCause() && InvocationTargetException.class.isInstance(e)) { e = e.getCause(); } throw new MultiException(e); }