public List<Annotated<Method>> findAnnotatedMethods(final Class<? extends Annotation> annotation) { Finder.this.findAnnotatedMethods(annotation); return typed(MethodInfo.class, getAnnotationInfos(annotation.getName())::stream).filter(CTOR.negate()) .map(methodInfo -> { try { return new IncludesClassfile<>((Method) methodInfo.get(), classfileAnnotationsFor(methodInfo)); } catch (final ClassNotFoundException e) { return null; } }).filter(hasAnnotation(annotation)).collect(Collectors.toList()); }
public List<Annotated<Constructor<?>>> findAnnotatedConstructors(final Class<? extends Annotation> annotation) { Finder.this.findAnnotatedConstructors(annotation); return typed(MethodInfo.class, getAnnotationInfos(annotation.getName())::stream).filter(CTOR) .map(methodInfo -> { try { final IncludesClassfile<Constructor<?>> annotated = new IncludesClassfile<>( (Constructor<?>) methodInfo.get(), classfileAnnotationsFor(methodInfo)); return annotated; } catch (final ClassNotFoundException e) { return null; } }).filter(hasAnnotation(annotation)).collect(Collectors.toList()); }
final Method method = (Method) methodInfo.get(); methods.add(method); } catch (ClassNotFoundException e) {
final Method method = (Method) methodInfo.get(); methods.add(method); } catch (ClassNotFoundException e) {
constructors.add((Constructor) methodInfo.get()); } catch (ClassNotFoundException e) { classesNotLoaded.add(methodInfo.getDeclaringClass().getName());
constructors.add((Constructor) methodInfo.get()); } catch (ClassNotFoundException e) { classesNotLoaded.add(methodInfo.getDeclaringClass().getName());
public Parameter<?> get() throws ClassNotFoundException { if (parameter == null) { Member member = declaringMethod.get(); if (member instanceof Method) { parameter = Parameter.declaredBy((Method) member, index); } else if (member instanceof Constructor<?>) { parameter = Parameter.declaredBy((Constructor<?>) member, index); } } return parameter; }
@Override public Annotation[] getDeclaredAnnotations() { super.getDeclaredAnnotations(); try { return ((AnnotatedElement) get()).getDeclaredAnnotations(); } catch (ClassNotFoundException e) { return super.getDeclaredAnnotations(); } }
@Override public Annotation[] getDeclaredAnnotations() { super.getDeclaredAnnotations(); try { return ((AnnotatedElement) get()).getDeclaredAnnotations(); } catch (ClassNotFoundException e) { return super.getDeclaredAnnotations(); } }
public Parameter<?> get() throws ClassNotFoundException { if (parameter == null) { Member member = declaringMethod.get(); if (member instanceof Method) { parameter = Parameter.declaredBy((Method) member, index); } else if (member instanceof Constructor<?>) { parameter = Parameter.declaredBy((Constructor<?>) member, index); } } return parameter; }
@Override public Annotation[] getDeclaredAnnotations() { super.getDeclaredAnnotations(); try { return ((AnnotatedElement) get()).getDeclaredAnnotations(); } catch (ClassNotFoundException e) { return super.getDeclaredAnnotations(); } }