@Override public <T extends Annotation> T getAnnotation(final Class<T> annotationType) { return ctor.getAnnotation(annotationType); }
else if (c.getAnnotation(Inject.class) != null)
@Override public <T extends Annotation> T getAnnotation(final Class<T> annotationType) { return ctor.getAnnotation(annotationType); }
@Override public <T extends Annotation> T getAnnotation(Class<T> annotationType) { return ctor.getAnnotation(annotationType); }
@Override public <T extends Annotation> T getAnnotation(Class<T> annotationType) { return constructor.getAnnotation(annotationType); }
private <T> boolean computeIsConstructorValidated(Class<T> targetClass, Constructor<T> ctor) { final AnnotatedType<T> annotatedType = CDI.current().getBeanManager().createAnnotatedType(ctor.getDeclaringClass()); final ValidateOnExecution annotation = annotatedType.getConstructors().stream().filter(ac -> ctor.equals(ac.getJavaMember())).findFirst() .map(ac -> ac.getAnnotation(ValidateOnExecution.class)) .orElseGet(() -> ctor.getAnnotation(ValidateOnExecution.class)); final Set<ExecutableType> validatedExecutableTypes = annotation == null ? classConfiguration : ExecutableTypes.interpret(annotation.type()); return validatedExecutableTypes.contains(ExecutableType.CONSTRUCTORS); }
private <T> boolean computeIsConstructorValidated(Class<T> targetClass, Constructor<T> ctor) { final AnnotatedType<T> annotatedType = CDI.current().getBeanManager().createAnnotatedType(ctor.getDeclaringClass()); final ValidateOnExecution annotation = annotatedType.getConstructors().stream().filter(ac -> ctor.equals(ac.getJavaMember())).findFirst() .map(ac -> ac.getAnnotation(ValidateOnExecution.class)) .orElseGet(() -> ctor.getAnnotation(ValidateOnExecution.class)); final Set<ExecutableType> validatedExecutableTypes = annotation == null ? classConfiguration : ExecutableTypes.interpret(annotation.type()); return validatedExecutableTypes.contains(ExecutableType.CONSTRUCTORS); }
/** * Check that simple web beans class has compatible constructor. * @param annotatedType web beans annotatedType * @throws WebBeansConfigurationException if the web beans has incompatible * constructor */ public boolean isConstructorOk(AnnotatedType<?> annotatedType) throws WebBeansConfigurationException { Class<?> clazz = annotatedType.getJavaClass(); Constructor<?> defaultCt = getNoArgConstructor(clazz); if (defaultCt != null ) { return true; } Set<? extends AnnotatedConstructor<?>> constructors = annotatedType.getConstructors(); for (AnnotatedConstructor<?> constructor : constructors) { if (constructor.getAnnotation(Inject.class) != null) { return true; } } return false; }
boolean mustPatch = false; if (constructor.getAnnotation(Inject.class) != null) { boolean methodHasEncodedAnnotation = constructor.isAnnotationPresent(Encoded.class); for (AnnotatedParameter<T> parameter : constructor.getParameters()) {
boolean mustPatch = false; if (constructor.getAnnotation(Inject.class) != null) { boolean methodHasEncodedAnnotation = constructor.isAnnotationPresent(Encoded.class); for (AnnotatedParameter<T> parameter : constructor.getParameters()) {
boolean mustPatch = false; if (constructor.getAnnotation(Inject.class) != null) { boolean methodHasEncodedAnnotation = constructor.isAnnotationPresent(Encoded.class); for (AnnotatedParameter<T> parameter : constructor.getParameters()) {