protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { // TODO we may need to really discover types here types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }