use of javax.enterprise.inject.spi.ProcessAnnotatedType in project kie-wb-common by kiegroup.
the class ControllerExtensionTest method testEmbeddedAnnotationWithEmbeddedController.
@Test
public void testEmbeddedAnnotationWithEmbeddedController() {
final ProcessAnnotatedType annotatedType = createAnnotatedType(KieServerEmbeddedControllerProducer.class);
extension.processEmbeddedController(annotatedType);
verify(annotatedType, never()).veto();
}
use of javax.enterprise.inject.spi.ProcessAnnotatedType in project kie-wb-common by kiegroup.
the class ControllerExtensionTest method testEmbeddedAnnotationWithStandaloneController.
@Test
public void testEmbeddedAnnotationWithStandaloneController() {
ControllerUtils.getConfigProps().put(KIE_SERVER_CONTROLLER, "http://localhost:8080/controller");
final ProcessAnnotatedType annotatedType = createAnnotatedType(KieServerEmbeddedControllerProducer.class);
extension.processEmbeddedController(annotatedType);
verify(annotatedType).veto();
}
use of javax.enterprise.inject.spi.ProcessAnnotatedType in project deltaspike by apache.
the class InterDynExtension method processAnnotatedType.
public void processAnnotatedType(@Observes ProcessAnnotatedType pat) {
if (enabled) {
AnnotatedType at = pat.getAnnotatedType();
String beanClassName = at.getJavaClass().getName();
AnnotatedTypeBuilder atb = null;
for (AnnotationRule rule : interceptorRules) {
if (beanClassName.matches(rule.getRule())) {
if (rule.requiresProxy() && !ClassUtils.isProxyableClass(at.getJavaClass())) {
logger.info("Skipping unproxyable class " + beanClassName + " even if matches rule=" + rule.getRule());
return;
}
if (atb == null) {
atb = new AnnotatedTypeBuilder();
atb.readFromType(at);
}
atb.addToClass(rule.getAdditionalAnnotation());
logger.info("Adding Dynamic Interceptor " + rule.getAdditionalAnnotation() + " to class " + beanClassName);
}
}
if (atb != null) {
pat.setAnnotatedType(atb.create());
}
}
}
Aggregations