@Override public Set<Annotation> getQualifiers() { return ImmutableSet.of(AnyLiteral.INSTANCE, DefaultLiteral.INSTANCE); }
@Override public Set<Type> getTypes() { return ImmutableSet.<Type> of(WeldContainer.class, Object.class); }
public BuiltInBeanAttributes(Class<T> type) { super(Collections.<Class<? extends Annotation>> emptySet(), false, null, Bindings.DEFAULT_QUALIFIERS, ImmutableSet.of(Object.class, type), Dependent.class); } }
public BuiltInBeanAttributes(Class<T> type) { super(Collections.<Class<? extends Annotation>> emptySet(), false, null, Bindings.DEFAULT_QUALIFIERS, ImmutableSet.<Type>of(type, Object.class), Dependent.class); } }
public BuiltInBeanAttributes(Class<T> type) { super(Collections.<Class<? extends Annotation>> emptySet(), false, null, Bindings.DEFAULT_QUALIFIERS, ImmutableSet.of(Object.class, type), Dependent.class); } }
public BuiltInBeanAttributes(Class<T> type) { super(Collections.<Class<? extends Annotation>> emptySet(), false, null, Bindings.DEFAULT_QUALIFIERS, ImmutableSet.of(Object.class, type), Dependent.class); } }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = observer.getEnhancedParameters(Observes.class).get(0); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.of(annotation.value()); } return Collections.emptySet(); }
public TypeDiscoveryConfiguration startExtensions(Iterable<Metadata<Extension>> extensions) { setExtensions(extensions); // TODO WELD-1624 Weld should fire BeforeBeanDiscovery to allow extensions to register additional scopes final Set<Class<? extends Annotation>> beanDefiningAnnotations = ImmutableSet.of( // built-in scopes Dependent.class, RequestScoped.class, ConversationScoped.class, SessionScoped.class, ApplicationScoped.class, javax.interceptor.Interceptor.class, javax.decorator.Decorator.class, // built-in stereotype Model.class, // meta-annotations NormalScope.class, Stereotype.class); return new TypeDiscoveryConfigurationImpl(beanDefiningAnnotations); }
public TypeDiscoveryConfiguration startExtensions(Iterable<Metadata<Extension>> extensions) { setExtensions(extensions); // TODO WELD-1624 Weld should fire BeforeBeanDiscovery to allow extensions to register additional scopes final Set<Class<? extends Annotation>> beanDefiningAnnotations = ImmutableSet.of( // built-in scopes Dependent.class, RequestScoped.class, ConversationScoped.class, SessionScoped.class, ApplicationScoped.class, javax.interceptor.Interceptor.class, javax.decorator.Decorator.class, // built-in stereotype Model.class, // meta-annotations NormalScope.class, Stereotype.class); return new TypeDiscoveryConfigurationImpl(beanDefiningAnnotations); }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.<Class<? extends Annotation>>of(annotation.value()); } return Collections.emptySet(); }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.<Class<? extends Annotation>>of(annotation.value()); } return Collections.emptySet(); }
@Override public AnnotationClass<?> apply(Class<? extends Annotation> input) { boolean scope = input.isAnnotationPresent(NormalScope.class) || input.isAnnotationPresent(Scope.class) || store.isExtraScope(input); Method repeatableAnnotationAccessor = Annotations.getRepeatableAnnotationAccessor(input); Set<Annotation> metaAnnotations = ImmutableSet.of(internalGetAnnotations(input)); return new AnnotationClassImpl<>(scope, repeatableAnnotationAccessor, metaAnnotations); } }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.<Class<? extends Annotation>>of(annotation.value()); } return Collections.emptySet(); }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.<Class<? extends Annotation>>of(annotation.value()); } return Collections.emptySet(); }
protected Set<Class<? extends Annotation>> initRequiredTypeAnnotations(EnhancedAnnotatedMethod<T, ? super X> observer) { EnhancedAnnotatedParameter<?, ? super X> eventParameter = getEventParameter(observer); WithAnnotations annotation = eventParameter.getAnnotation(WithAnnotations.class); if (annotation != null) { return ImmutableSet.<Class<? extends Annotation>>of(annotation.value()); } return Collections.emptySet(); }
@Override public AnnotationClass<?> apply(Class<? extends Annotation> input) { boolean scope = input.isAnnotationPresent(NormalScope.class) || input.isAnnotationPresent(Scope.class) || store.isExtraScope(input); Method repeatableAnnotationAccessor = Annotations.getRepeatableAnnotationAccessor(input); Set<Annotation> metaAnnotations = ImmutableSet.of(internalGetAnnotations(input)); return new AnnotationClassImpl<>(scope, repeatableAnnotationAccessor, metaAnnotations); } }
@Override public AnnotationClass<?> apply(Class<? extends Annotation> input) { boolean scope = input.isAnnotationPresent(NormalScope.class) || input.isAnnotationPresent(Scope.class) || store.isExtraScope(input); Method repeatableAnnotationAccessor = Annotations.getRepeatableAnnotationAccessor(input); Set<Annotation> metaAnnotations = ImmutableSet.of(internalGetAnnotations(input)); return new AnnotationClassImpl<>(scope, repeatableAnnotationAccessor, metaAnnotations); } }
@Override public AnnotationClass<?> apply(Class<? extends Annotation> input) { boolean scope = input.isAnnotationPresent(NormalScope.class) || input.isAnnotationPresent(Scope.class) || store.isExtraScope(input); Method repeatableAnnotationAccessor = Annotations.getRepeatableAnnotationAccessor(input); Set<Annotation> metaAnnotations = ImmutableSet.of(internalGetAnnotations(input)); return new AnnotationClassImpl<>(scope, repeatableAnnotationAccessor, metaAnnotations); } }
@Override public AnnotationClass<?> apply(Class<? extends Annotation> input) { boolean scope = input.isAnnotationPresent(NormalScope.class) || input.isAnnotationPresent(Scope.class) || store.isExtraScope(input); Method repeatableAnnotationAccessor = Annotations.getRepeatableAnnotationAccessor(input); Set<Annotation> metaAnnotations = ImmutableSet.of(internalGetAnnotations(input)); return new AnnotationClassImpl<>(scope, repeatableAnnotationAccessor, metaAnnotations); } }
@Override public Set<Annotation> apply(BackedAnnotatedParameter<?> parameter) { final Member member = parameter.getDeclaringCallable().getJavaMember(); if (member instanceof Method) { return ImmutableSet.of(getParameterAnnotations((Method) member, parameter.getPosition())); } else { return ImmutableSet.of(getParameterAnnotations((Constructor<?>) member, parameter.getPosition())); } }