javax.interceptor.InterceptorBinding Java Examples
The following examples show how to use
javax.interceptor.InterceptorBinding.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InterDynExtension.java From deltaspike with Apache License 2.0 | 5 votes |
public void init() { Set<String> ruleConfigKeys = new HashSet<String>(); // first we collect all the rule property names for (String propertyName : ConfigResolver.getAllProperties().keySet()) { if (propertyName.startsWith(CoreBaseConfig.InterDynCustomization.INTERDYN_RULE_PREFIX) && propertyName.contains(".match")) { ruleConfigKeys.add(propertyName.substring(0, propertyName.indexOf(".match"))); } } for (String ruleConfigKey : ruleConfigKeys) { String match = ConfigResolver.getPropertyValue(ruleConfigKey + ".match"); String annotationClassName = ConfigResolver.getPropertyValue(ruleConfigKey + ".annotation"); if (match != null && annotationClassName != null && match.length() > 0 && annotationClassName.length() > 0) { Annotation anno = getAnnotationImplementation(annotationClassName); boolean requiresProxy = anno.annotationType().getAnnotation(InterceptorBinding.class) != null; interceptorRules.add(new AnnotationRule(match, anno, requiresProxy)); } } if (interceptorRules.isEmpty()) { enabled = false; } }
Example #2
Source File: BeanManagerImpl.java From quarkus with Apache License 2.0 | 4 votes |
@Override public boolean isInterceptorBinding(Class<? extends Annotation> annotationType) { return annotationType.isAnnotationPresent(InterceptorBinding.class) || ArcContainerImpl.instance().getTransitiveInterceptorBindings().containsKey(annotationType); }