private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
private boolean isInterceptorMethod(Method method) { return ctx.getInterceptionModel().getTargetClassInterceptorMetadata().isInterceptorMethod(method); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
public List<InterceptorMethodInvocation> buildInterceptorMethodInvocations(Object instance, Method method, InterceptionType interceptionType) { List<? extends InterceptorClassMetadata<?>> interceptorList = interceptionModel.getInterceptors(interceptionType, method); List<InterceptorMethodInvocation> interceptorInvocations = new ArrayList<InterceptorMethodInvocation>(interceptorList.size()); for (InterceptorClassMetadata<?> interceptorMetadata : interceptorList) { interceptorInvocations.addAll(interceptorMetadata.getInterceptorInvocation(getInterceptorInstance(interceptorMetadata), interceptionType) .getInterceptorMethodInvocations()); } TargetClassInterceptorMetadata targetClassInterceptorMetadata = getInterceptionModel().getTargetClassInterceptorMetadata(); if (targetClassInterceptorMetadata != null && targetClassInterceptorMetadata.isEligible(interceptionType)) { interceptorInvocations .addAll(targetClassInterceptorMetadata.getInterceptorInvocation(instance, interceptionType).getInterceptorMethodInvocations()); } return ImmutableList.copyOf(interceptorInvocations); }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted // TODO - reduce this to decorated types only if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }
private Set<InterceptionModel> getInterceptionModelsForType(EnhancedAnnotatedType<T> type, BeanManagerImpl manager, Bean<?> bean) { // if the bean has decorators consider all methods as intercepted if (bean != null && !manager.resolveDecorators(bean.getTypes(), bean.getQualifiers()).isEmpty()) { return null; } SlimAnnotatedTypeStore store = manager.getServices().get(SlimAnnotatedTypeStore.class); Set<InterceptionModel> models = new HashSet<InterceptionModel>(); WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(type.slim())); for (SlimAnnotatedType<?> slimType : store.get(type.getJavaClass())) { WeldCollections.addIfNotNull(models, manager.getInterceptorModelRegistry().get(slimType)); } for (InterceptionModel model : models) { if (model.hasTargetClassInterceptors() && model.getTargetClassInterceptorMetadata().isEligible(InterceptionType.AROUND_INVOKE)) { // this means that all methods are intercepted // returning null here means that all methods will be overridden and will delegate to MethodHandler return null; } } return models; }