private void checkDecoratedMethods(EnhancedAnnotatedType<T> type, List<Decorator<?>> decorators) { if (type.isFinal()) { throw BeanLogger.LOG.finalBeanClassWithDecoratorsNotAllowed(this); } checkNoArgsConstructor(type); for (Decorator<?> decorator : decorators) { EnhancedAnnotatedType<?> decoratorClass; if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> decoratorBean = (DecoratorImpl<?>) decorator; decoratorClass = decoratorBean.getBeanManager().getServices().get(ClassTransformer.class) .getEnhancedAnnotatedType(decoratorBean.getAnnotated()); } else if (decorator instanceof CustomDecoratorWrapper<?>) { decoratorClass = ((CustomDecoratorWrapper<?>) decorator).getEnhancedAnnotated(); } else { throw BeanLogger.LOG.nonContainerDecorator(decorator); } for (EnhancedAnnotatedMethod<?, ?> decoratorMethod : decoratorClass.getEnhancedMethods()) { EnhancedAnnotatedMethod<?, ?> method = type.getEnhancedMethod(decoratorMethod.getSignature()); if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal()) { throw BeanLogger.LOG.finalBeanClassWithInterceptorsNotAllowed(this); } } } }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PreDestroy.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PreDestroy.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PreDestroy.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PostConstruct.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(Inject.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PreDestroy.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PostConstruct.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PreDestroy.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(Inject.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(PostConstruct.class); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(InterceptionTypeRegistry.getAnnotationClass(interceptionType)); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(InterceptionTypeRegistry.getAnnotationClass(interceptionType)); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(InterceptionTypeRegistry.getAnnotationClass(interceptionType)); }
@Override public Collection<EnhancedAnnotatedMethod<?, ? super T>> getAllMethods(EnhancedAnnotatedType<T> type) { return type.getEnhancedMethods(InterceptionTypeRegistry.getAnnotationClass(interceptionType)); }
public static List<EnhancedAnnotatedMethod<?, ?>> getInterceptableMethods(EnhancedAnnotatedType<?> type) { List<EnhancedAnnotatedMethod<?, ?>> annotatedMethods = new ArrayList<EnhancedAnnotatedMethod<?, ?>>(); for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : type.getEnhancedMethods()) { boolean businessMethod = !annotatedMethod.isStatic() && !annotatedMethod.isAnnotationPresent(Inject.class) && !annotatedMethod.getJavaMember().isBridge(); if (businessMethod && !isInterceptorMethod(annotatedMethod)) { annotatedMethods.add(annotatedMethod); } } return annotatedMethods; }
public static List<EnhancedAnnotatedMethod<?, ?>> getInterceptableMethods(EnhancedAnnotatedType<?> type) { List<EnhancedAnnotatedMethod<?, ?>> annotatedMethods = new ArrayList<EnhancedAnnotatedMethod<?, ?>>(); for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : type.getEnhancedMethods()) { boolean businessMethod = !annotatedMethod.isStatic() && !annotatedMethod.isAnnotationPresent(Inject.class) && !annotatedMethod.getJavaMember().isBridge(); if (businessMethod && !isInterceptorMethod(annotatedMethod)) { annotatedMethods.add(annotatedMethod); } } return annotatedMethods; }
public static List<EnhancedAnnotatedMethod<?, ?>> getInterceptableMethods(EnhancedAnnotatedType<?> type) { List<EnhancedAnnotatedMethod<?, ?>> annotatedMethods = new ArrayList<EnhancedAnnotatedMethod<?, ?>>(); for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : type.getEnhancedMethods()) { boolean businessMethod = !annotatedMethod.isStatic() && !annotatedMethod.isAnnotationPresent(Inject.class) && !annotatedMethod.getJavaMember().isBridge(); if (businessMethod && !isInterceptorMethod(annotatedMethod)) { annotatedMethods.add(annotatedMethod); } } return annotatedMethods; }
public static List<EnhancedAnnotatedMethod<?, ?>> getInterceptableMethods(EnhancedAnnotatedType<?> type) { List<EnhancedAnnotatedMethod<?, ?>> annotatedMethods = new ArrayList<EnhancedAnnotatedMethod<?, ?>>(); for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : type.getEnhancedMethods()) { boolean businessMethod = !annotatedMethod.isStatic() && !annotatedMethod.isAnnotationPresent(Inject.class) && !annotatedMethod.getJavaMember().isBridge(); if (businessMethod && !isInterceptorMethod(annotatedMethod)) { annotatedMethods.add(annotatedMethod); } } return annotatedMethods; }
public static List<EnhancedAnnotatedMethod<?, ?>> getInterceptableMethods(EnhancedAnnotatedType<?> type) { List<EnhancedAnnotatedMethod<?, ?>> annotatedMethods = new ArrayList<EnhancedAnnotatedMethod<?, ?>>(); for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : type.getEnhancedMethods()) { boolean businessMethod = !annotatedMethod.isStatic() && !annotatedMethod.isAnnotationPresent(Inject.class) && !annotatedMethod.getJavaMember().isBridge(); if (businessMethod && !isInterceptorMethod(annotatedMethod)) { annotatedMethods.add(annotatedMethod); } } return annotatedMethods; }