public XbeanScanningLoader(final Archive archive) { final AnnotationFinder finder = new AnnotationFinder(archive); for (final Method method : finder.findAnnotatedMethods(Command.class)) { classes.add(method.getDeclaringClass()); } }
public XbeanScanningLoader(final Archive archive) { final AnnotationFinder finder = new AnnotationFinder(archive); for (final Method method : finder.findAnnotatedMethods(Command.class)) { classes.add(method.getDeclaringClass()); } }
.findAnnotatedMethods(HealthCheck.class) .stream() .filter(h -> h.getDeclaringClass().isAnnotationPresent(Service.class))
errors.addAll(getActionsStream().flatMap(action -> finder.findAnnotatedMethods(action).stream()).map(action -> { final Annotation actionAnnotation = Stream .of(action.getAnnotations())
private <A extends Annotation> void checkAttributes(final AnnotationHandler<A> handler, final String ejbName, final EjbModule ejbModule, final AnnotationFinder annotationFinder, final String messageKey) { final Map<String, List<MethodAttribute>> existingDeclarations = handler.getExistingDeclarations(); int xml = 0; for (final List<MethodAttribute> methodAttributes : existingDeclarations.values()) { xml += methodAttributes.size(); } if (xml > 0) { ejbModule.getValidation().warn(ejbName, "xml." + messageKey, xml); } int ann = annotationFinder.findAnnotatedClasses(handler.getAnnotationClass()).size(); ann += annotationFinder.findAnnotatedMethods(handler.getAnnotationClass()).size(); if (ann > 0) { ejbModule.getValidation().warn(ejbName, "ann." + messageKey, ann); } }
private <A extends Annotation> void checkAttributes(final AnnotationHandler<A> handler, final String ejbName, final EjbModule ejbModule, final AnnotationFinder annotationFinder, final String messageKey) { final Map<String, List<MethodAttribute>> existingDeclarations = handler.getExistingDeclarations(); int xml = 0; for (final List<MethodAttribute> methodAttributes : existingDeclarations.values()) { xml += methodAttributes.size(); } if (xml > 0) { ejbModule.getValidation().warn(ejbName, "xml." + messageKey, xml); } int ann = annotationFinder.findAnnotatedClasses(handler.getAnnotationClass()).size(); ann += annotationFinder.findAnnotatedMethods(handler.getAnnotationClass()).size(); if (ann > 0) { ejbModule.getValidation().warn(ejbName, "ann." + messageKey, ann); } }
final List<Method> annotatedMethods = finder.findAnnotatedMethods(action); return Stream .concat(annotatedMethods .findAnnotatedMethods(DynamicValues.class) .stream() .filter(m -> countParameters(m) != 0) .findAnnotatedMethods(HealthCheck.class) .stream() .filter(m -> countParameters(m) != 1 .findAnnotatedMethods(DiscoverSchema.class) .stream() .filter(m -> countParameters(m) != 1 .findAnnotatedMethods(Update.class) .stream() .collect(toMap(m -> m.getAnnotation(Update.class).value(), identity())); .collect(toSet()); final Set<String> dynamicValues = finder .findAnnotatedMethods(DynamicValues.class) .stream() .map(f -> f.getAnnotation(DynamicValues.class).value())
null : new AnnotationFinder(new ClassesArchive(ancestors(clazz))); final List<Method> postConstructs = finder == null ? Collections.<Method>emptyList() : finder.findAnnotatedMethods(PostConstruct.class); final List<Method> preDestroys = finder == null ? Collections.<Method>emptyList() : finder.findAnnotatedMethods(PreDestroy.class);
null : new AnnotationFinder(new ClassesArchive(ancestors(clazz))); final List<Method> postConstructs = finder == null ? Collections.<Method>emptyList() : finder.findAnnotatedMethods(PostConstruct.class); final List<Method> preDestroys = finder == null ? Collections.<Method>emptyList() : finder.findAnnotatedMethods(PreDestroy.class);
}); finder .findAnnotatedMethods(Request.class) .stream() .map(Method::getDeclaringClass)
for (final Method m : finder.findAnnotatedMethods(org.apache.openejb.testing.Module.class)) { instance = configureModule(appModule, ejbModule, clazz, instance, m); for (final Method m : finder.findAnnotatedMethods(Configuration.class)) { instance = configureConfiguration(appModule, clazz, instance, m);