public boolean isMatch(AnnotatedMethod<?> method) { if (! method.getJavaMember().getName().equals(_methodName)) return false; else if (method.getDeclaringType().getJavaClass().getName().equals(_className) || _className == null) return true; else return false; }
public boolean isMatch(AnnotatedMethod<?> method) { if (! method.getJavaMember().getName().equals(_methodName)) return false; else if (method.getDeclaringType().getJavaClass().getName().equals(_className) || _className == null) return true; else return false; }
private void validateDisposalMethod(AnnotatedType declaringType, AnnotatedMethod<? super P> annotatedMethod) { if (!annotatedMethod.getDeclaringType().equals(declaringType)) { throw new WebBeansConfigurationException("Producer method component of the disposal method : " + annotatedMethod.getJavaMember().getName() + " in class : " + annotatedMethod.getDeclaringType().getJavaClass() + " must be in the same class!"); } checkDisposalMethod(annotatedMethod); }
@Override public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) { BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this); return new MethodProducerFactory<X>(method, declaringBean, manager); }
void registerSecuredMethods() { for (AnnotatedMethod<?> method : securedMethods) { registerSecuredMethod(method.getDeclaringType().getJavaClass(), method.getJavaMember()); } }
@Override public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) { BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this); return new MethodProducerFactory<X>(method, declaringBean, manager); }
@Override public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) { BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this); return new MethodProducerFactory<X>(method, declaringBean, manager); }
void registerSecuredMethods() { for (AnnotatedMethod<?> method : securedMethods) { registerSecuredMethod(method.getDeclaringType().getJavaClass(), method.getJavaMember()); } }
@Override public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) { BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this); return new MethodProducerFactory<X>(method, declaringBean, manager); }
@Override public <X> MethodProducerFactory<X> getProducerFactory(AnnotatedMethod<? super X> method, Bean<X> declaringBean) { BeanManagerImpl manager = BeanManagerLookupService.lookupBeanManager(method.getDeclaringType().getJavaClass(), this); return new MethodProducerFactory<X>(method, declaringBean, manager); }
public static String formatAnnotatedMethod(AnnotatedMethod<?> method) { return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations())) + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "." + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters()); }
public static String formatAnnotatedMethod(AnnotatedMethod<?> method) { return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations())) + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "." + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters()); }
public static String formatAnnotatedMethod(AnnotatedMethod<?> method) { return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations())) + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "." + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters()); }
public static String formatAnnotatedMethod(AnnotatedMethod<?> method) { return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations())) + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "." + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters()); }
public static String formatAnnotatedMethod(AnnotatedMethod<?> method) { return Formats.formatSimpleClassName(method) + " " + Formats.addSpaceIfNeeded(Formats.formatAnnotations(method.getAnnotations())) + Formats.addSpaceIfNeeded(Formats.formatModifiers(method.getJavaMember().getModifiers())) + method.getDeclaringType().getJavaClass().getName() + "." + method.getJavaMember().getName() + Formats.formatAsFormalParameterList(method.getParameters()); }
public GenericConfig(Class<X> annotationType, AnnotatedMethod<?> annotatedMethod) { this(annotatedMethod.getJavaMember(), annotatedMethod, annotatedMethod.isAnnotationPresent(annotationType) ? annotatedMethod.getAnnotation(annotationType) : annotatedMethod.getDeclaringType().getAnnotation(annotationType), annotatedMethod.isAnnotationPresent(annotationType) ? ElementType.METHOD : ElementType.TYPE); }
<T, X> void registerGenericBeanObserverMethod(@Observes ProcessObserverMethod<T, X> event) { AnnotatedType<X> declaringType = event.getAnnotatedMethod().getDeclaringType(); if (declaringType.isAnnotationPresent(GenericConfiguration.class)) { AnnotatedMethod<X> method = event.getAnnotatedMethod(); Class<? extends Annotation> genericConfigurationType = declaringType.getAnnotation(GenericConfiguration.class).value(); genericBeanObserverMethods.put(genericConfigurationType, new ObserverMethodHolder<X, T>(method, event.getObserverMethod())); } }
public static FaultToleranceOperation of(AnnotatedMethod<?> annotatedMethod) { return new FaultToleranceOperation(annotatedMethod.getDeclaringType().getJavaClass(), annotatedMethod.getJavaMember(), isAsync(annotatedMethod), getConfig(Bulkhead.class, annotatedMethod, BulkheadConfig::new), getConfig(CircuitBreaker.class, annotatedMethod, CircuitBreakerConfig::new), getConfig(Fallback.class, annotatedMethod, FallbackConfig::new), getConfig(Retry.class, annotatedMethod, RetryConfig::new), getConfig(Timeout.class, annotatedMethod, TimeoutConfig::new)); }
<T, X> void registerGenericBeanObserverMethod(@Observes ProcessObserverMethod<T, X> event) { if (event.getAnnotatedMethod() == null) { return; } AnnotatedType<X> declaringType = event.getAnnotatedMethod().getDeclaringType(); if (declaringType.isAnnotationPresent(GenericConfiguration.class)) { AnnotatedMethod<X> method = event.getAnnotatedMethod(); Class<? extends Annotation> genericConfigurationType = declaringType.getAnnotation(GenericConfiguration.class).value(); genericBeanObserverMethods.put(genericConfigurationType, new ObserverMethodHolder<X, T>(method, event.getObserverMethod())); } }
<X, T> void registerGenericBeanProducerMethod(@Observes ProcessProducerMethod<X, T> event) { AnnotatedType<X> declaringType = event.getAnnotatedProducerMethod().getDeclaringType(); Annotation genericConfiguration = getGenericConfiguration(event.getAnnotated()); if (declaringType.isAnnotationPresent(GenericConfiguration.class)) { genericBeanProducerMethods.put(declaringType.getAnnotation(GenericConfiguration.class).value(), getProducerMethodHolder(event)); } else if (genericConfiguration != null) { if (validateGenericProducer(genericConfiguration, event.getBean(), event.getAnnotatedProducerMethod())) { genericProducerBeans.put(event.getAnnotatedProducerMethod(), event.getBean()); } } }