public List<Annotated<Method>> findMetaAnnotatedMethods(Class<? extends Annotation> annotation) { classesNotLoaded.clear(); Set<Method> methods = findMetaAnnotatedMethods(annotation, new HashSet<Method>(), new HashSet<String>()); List<Annotated<Method>> targets = new ArrayList<Annotated<Method>>(); for (Method method : methods) { targets.add(new MetaAnnotatedMethod(method)); } return targets; }
public List<Annotated<Method>> findMetaAnnotatedMethods(Class<? extends Annotation> annotation) { classesNotLoaded.clear(); Set<Method> methods = findMetaAnnotatedMethods(annotation, new HashSet<Method>(), new HashSet<String>()); List<Annotated<Method>> targets = new LinkedList<Annotated<Method>>(); for (Method method : methods) { targets.add(new MetaAnnotatedMethod(method)); } return targets; }
public List<Annotated<Method>> findMetaAnnotatedMethods(Class<? extends Annotation> annotation) { classesNotLoaded.clear(); Set<Method> methods = findMetaAnnotatedMethods(annotation, new HashSet<Method>(), new HashSet<String>()); List<Annotated<Method>> targets = new LinkedList<Annotated<Method>>(); for (Method method : methods) { targets.add(new MetaAnnotatedMethod(method)); } return targets; }
private void processAsynchronous(final EnterpriseBean bean, final AnnotationFinder annotationFinder) { if (!(bean instanceof SessionBean)) { return; } final SessionBean sessionBean = (SessionBean) bean; for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(Asynchronous.class)) { sessionBean.getAsyncMethod().add(new AsyncMethod(method.get())); } //Spec 4.5.1 @Asynchronous could be used at the class level of a bean-class ( or superclass ). //Seems that it should not be used on the any interface view for (final Annotated<Class<?>> clazz : annotationFinder.findMetaAnnotatedClasses(Asynchronous.class)) { if (!clazz.get().isInterface()) { sessionBean.getAsynchronousClasses().add(clazz.get().getName()); } } }
private void processAsynchronous(final EnterpriseBean bean, final AnnotationFinder annotationFinder) { if (!(bean instanceof SessionBean)) { return; } final SessionBean sessionBean = (SessionBean) bean; for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(Asynchronous.class)) { sessionBean.getAsyncMethod().add(new AsyncMethod(method.get())); } //Spec 4.5.1 @Asynchronous could be used at the class level of a bean-class ( or superclass ). //Seems that it should not be used on the any interface view for (final Annotated<Class<?>> clazz : annotationFinder.findMetaAnnotatedClasses(Asynchronous.class)) { if (!clazz.get().isInterface()) { sessionBean.getAsynchronousClasses().add(clazz.get().getName()); } } }
findMetaAnnotatedMethods((Class<? extends Annotation>) clazz, methods, seen);
findMetaAnnotatedMethods((Class<? extends Annotation>) clazz, methods, seen);
findMetaAnnotatedMethods((Class<? extends Annotation>) clazz, methods, seen);
final List<Annotated<Method>> methods = annotationFinder.findMetaAnnotatedMethods(annotationClass); for (final Annotated<Method> method : methods) { final A attribute = method.getAnnotation(annotationClass);
scheduleMethods.addAll(annotationFinder.findMetaAnnotatedMethods(Schedules.class)); scheduleMethods.addAll(annotationFinder.findMetaAnnotatedMethods(Schedule.class));
scheduleMethods.addAll(annotationFinder.findMetaAnnotatedMethods(Schedules.class)); scheduleMethods.addAll(annotationFinder.findMetaAnnotatedMethods(Schedule.class));
final List<Annotated<Method>> methods = annotationFinder.findMetaAnnotatedMethods(annotationClass); for (final Annotated<Method> method : methods) { final A attribute = method.getAnnotation(annotationClass);
for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PostConstruct.class))) { bean.getPostConstruct().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PreDestroy.class))) { bean.getPreDestroy().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.interceptor.AroundInvoke.class))) { invokable.getAroundInvoke().add(new AroundInvoke(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.interceptor.AroundTimeout.class))) { invokable.getAroundTimeout().add(new AroundTimeout(method.get())); final TimerConsumer timerConsumer = (TimerConsumer) bean; if (timerConsumer.getTimeoutMethod() == null) { final List<Annotated<Method>> timeoutMethods = sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.ejb.Timeout.class)); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(AfterBegin.class))) { session.getAfterBegin().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(BeforeCompletion.class))) { session.getBeforeCompletion().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(AfterCompletion.class))) { session.getAfterCompletion().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PostActivate.class))) { session.getPostActivate().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PrePassivate.class))) {
for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PostConstruct.class))) { bean.getPostConstruct().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PreDestroy.class))) { bean.getPreDestroy().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.interceptor.AroundInvoke.class))) { invokable.getAroundInvoke().add(new AroundInvoke(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.interceptor.AroundTimeout.class))) { invokable.getAroundTimeout().add(new AroundTimeout(method.get())); final TimerConsumer timerConsumer = (TimerConsumer) bean; if (timerConsumer.getTimeoutMethod() == null) { final List<Annotated<Method>> timeoutMethods = sortMethods(annotationFinder.findMetaAnnotatedMethods(javax.ejb.Timeout.class)); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(AfterBegin.class))) { session.getAfterBegin().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(BeforeCompletion.class))) { session.getBeforeCompletion().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(AfterCompletion.class))) { session.getAfterCompletion().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PostActivate.class))) { session.getPostActivate().add(new LifecycleCallback(method.get())); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(PrePassivate.class))) {
for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(RolesAllowed.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final RolesAllowed rolesAllowed = method.getAnnotation(RolesAllowed.class); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(PermitAll.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final MethodPermission methodPermission = new MethodPermission(); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(DenyAll.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final ExcludeList excludeList = assemblyDescriptor.getExcludeList();
for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(RolesAllowed.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final RolesAllowed rolesAllowed = method.getAnnotation(RolesAllowed.class); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(PermitAll.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final MethodPermission methodPermission = new MethodPermission(); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(DenyAll.class)) { checkConflictingSecurityAnnotations(method, ejbName, ejbModule, seen); final ExcludeList excludeList = assemblyDescriptor.getExcludeList();
final List<Annotated<Method>> annotatedMethods = sortMethods(annotationFinder.findMetaAnnotatedMethods(Interceptors.class)); for (final Annotated<Method> method : annotatedMethods) { final Interceptors interceptors = method.getAnnotation(Interceptors.class); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(ExcludeDefaultInterceptors.class)) { final InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean)); binding.setExcludeDefaultInterceptors(true); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(ExcludeClassInterceptors.class))) { final InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean)); binding.setExcludeClassInterceptors(true);
final List<Annotated<Method>> annotatedMethods = sortMethods(annotationFinder.findMetaAnnotatedMethods(Interceptors.class)); for (final Annotated<Method> method : annotatedMethods) { final Interceptors interceptors = method.getAnnotation(Interceptors.class); for (final Annotated<Method> method : annotationFinder.findMetaAnnotatedMethods(ExcludeDefaultInterceptors.class)) { final InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean)); binding.setExcludeDefaultInterceptors(true); for (final Annotated<Method> method : sortMethods(annotationFinder.findMetaAnnotatedMethods(ExcludeClassInterceptors.class))) { final InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean)); binding.setExcludeClassInterceptors(true);