private boolean initHasPostConstructCallback(InjectionTarget<T> producer) { if (producer instanceof BasicInjectionTarget<?>) { BasicInjectionTarget<?> weldProducer = (BasicInjectionTarget<?>) producer; final InterceptionModel interceptors = getInterceptors(); if (interceptors == null || interceptors.getInterceptors(InterceptionType.POST_CONSTRUCT, null).isEmpty()) { if (!weldProducer.getLifecycleCallbackInvoker().hasPostConstructCallback()) { return false; } } } // otherwise we assume there is a post construct callback, just to be safe return true; } }
private boolean initHasPostConstructCallback(InjectionTarget<T> producer) { if (producer instanceof BasicInjectionTarget<?>) { BasicInjectionTarget<?> weldProducer = (BasicInjectionTarget<?>) producer; final InterceptionModel interceptors = getInterceptors(); if (interceptors == null || interceptors.getInterceptors(InterceptionType.POST_CONSTRUCT, null).isEmpty()) { if (!weldProducer.getLifecycleCallbackInvoker().hasPostConstructCallback()) { return false; } } } // otherwise we assume there is a post construct callback, just to be safe return true; } }
private boolean initHasPostConstructCallback(InjectionTarget<T> producer) { if (producer instanceof BasicInjectionTarget<?>) { BasicInjectionTarget<?> weldProducer = (BasicInjectionTarget<?>) producer; final InterceptionModel interceptors = getInterceptors(); if (interceptors == null || interceptors.getInterceptors(InterceptionType.POST_CONSTRUCT, null).isEmpty()) { if (!weldProducer.getLifecycleCallbackInvoker().hasPostConstructCallback()) { return false; } } } // otherwise we assume there is a post construct callback, just to be safe return true; } }
private boolean initHasPostConstructCallback(InjectionTarget<T> producer) { if (producer instanceof BasicInjectionTarget<?>) { BasicInjectionTarget<?> weldProducer = (BasicInjectionTarget<?>) producer; final InterceptionModel interceptors = getInterceptors(); if (interceptors == null || interceptors.getInterceptors(InterceptionType.POST_CONSTRUCT, null).isEmpty()) { if (!weldProducer.getLifecycleCallbackInvoker().hasPostConstructCallback()) { return false; } } } // otherwise we assume there is a post construct callback, just to be safe return true; } }
private boolean initHasPostConstructCallback(InjectionTarget<T> producer) { if (producer instanceof BasicInjectionTarget<?>) { BasicInjectionTarget<?> weldProducer = (BasicInjectionTarget<?>) producer; final InterceptionModel interceptors = getInterceptors(); if (interceptors == null || interceptors.getInterceptors(InterceptionType.POST_CONSTRUCT, null).isEmpty()) { if (!weldProducer.getLifecycleCallbackInvoker().hasPostConstructCallback()) { return false; } } } // otherwise we assume there is a post construct callback, just to be safe return true; } }
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); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }