Refine search
protected static void addMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, Iterable<Annotation> metaAnnotations, boolean declared) { for (Annotation metaAnnotation : metaAnnotations) { addMetaAnnotation(metaAnnotationMap, annotation, metaAnnotation.annotationType(), declared); } }
public boolean isPrimitive() { return getJavaClass().isPrimitive(); }
@Deprecated public Set<Annotation> getQualifiers() { Set<Annotation> qualifiers = getMetaAnnotations(Qualifier.class); if (qualifiers.size() > 0) { return WeldCollections.immutableSetView(qualifiers); } else { return DEFAULT_QUALIFIERS; } }
this.delegate = annotated; if (annotated instanceof AnnotatedType<?>) { this.rawType = Reflections.<AnnotatedType<T>>cast(annotated).getJavaClass(); } else { this.rawType = Reflections.getRawType(annotated.getBaseType()); throw ReflectionLogger.LOG.annotationMapNull(); this.annotationMap = immutableMapView(annotationMap); SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap = SetMultimap.newSetMultimap(); processMetaAnnotations(metaAnnotationMap, annotationMap.values(), classTransformer, false); this.metaAnnotationMap = Multimaps.unmodifiableMultimap(metaAnnotationMap);
public Set<Type> getInterfaceClosure() { Set<Type> interfaces = new HashSet<Type>(); for (Type t : getTypeClosure()) { if (Reflections.getRawType(t).isInterface()) { interfaces.add(t); } } return WeldCollections.immutableSetView(interfaces); }
this.delegate = annotated; if (annotated instanceof AnnotatedType<?>) { this.rawType = Reflections.<AnnotatedType<T>>cast(annotated).getJavaClass(); } else { this.rawType = Reflections.getRawType(annotated.getBaseType()); throw ReflectionLogger.LOG.annotationMapNull(); this.annotationMap = immutableMapView(annotationMap); SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap = SetMultimap.newSetMultimap(); for (Annotation annotation : annotationMap.values()) { .getSyntheticAnnotationAnnotatedType(annotation.annotationType()); if (syntheticAnnotationAnnotatedType == null) { addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getReflectionCache().getAnnotations(annotation.annotationType()), false); } else { addMetaAnnotations(metaAnnotationMap, annotation, syntheticAnnotationAnnotatedType.getAnnotations(), false); addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), false);
public Set<Type> getInterfaceClosure() { Set<Type> interfaces = new HashSet<Type>(); for (Type t : getTypeClosure()) { if (Reflections.getRawType(t).isInterface()) { interfaces.add(t); } } return Collections.unmodifiableSet(interfaces); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, ClassTransformer classTransformer, boolean declared) { // WELD-1310 Include synthetic annotations SlimAnnotatedType<?> syntheticAnnotationAnnotatedType = classTransformer.getSyntheticAnnotationAnnotatedType(annotation.annotationType()); if (syntheticAnnotationAnnotatedType != null) { addMetaAnnotations(metaAnnotationMap, annotation, syntheticAnnotationAnnotatedType.getAnnotations(), declared); } else { addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getReflectionCache().getAnnotations(annotation.annotationType()), declared); ReflectionCache.AnnotationClass<?> annotationClass = classTransformer.getReflectionCache().getAnnotationClass(annotation.annotationType()); if (annotationClass.isRepeatableAnnotationContainer()) { processMetaAnnotations(metaAnnotationMap, annotationClass.getRepeatableAnnotations(annotation), classTransformer, declared); } } addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), declared); }
@Deprecated public Annotation[] getBindingsAsArray() { return getQualifiers().toArray(EMPTY_ANNOTATIONS); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Collection<Annotation> annotations, ClassTransformer classTransformer, boolean declared) { for (Annotation annotation : annotations) { processMetaAnnotations(metaAnnotationMap, annotation, classTransformer, declared); } }
@Deprecated public Set<Annotation> getQualifiers() { if (getMetaAnnotations(Qualifier.class).size() > 0) { return Collections.unmodifiableSet(getMetaAnnotations(Qualifier.class)); } else { return DEFAULT_QUALIFIERS; } }
this.delegate = annotated; if (annotated instanceof AnnotatedType<?>) { this.rawType = Reflections.<AnnotatedType<T>>cast(annotated).getJavaClass(); } else { this.rawType = Reflections.getRawType(annotated.getBaseType()); throw ReflectionLogger.LOG.annotationMapNull(); this.annotationMap = immutableMapView(annotationMap); SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap = SetMultimap.newSetMultimap(); processMetaAnnotations(metaAnnotationMap, annotationMap.values(), classTransformer, false); this.metaAnnotationMap = Multimaps.unmodifiableMultimap(metaAnnotationMap);
public Set<Type> getInterfaceClosure() { Set<Type> interfaces = new HashSet<Type>(); for (Type t : getTypeClosure()) { if (Reflections.getRawType(t).isInterface()) { interfaces.add(t); } } return WeldCollections.immutableSetView(interfaces); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, ClassTransformer classTransformer, boolean declared) { // WELD-1310 Include synthetic annotations SlimAnnotatedType<?> syntheticAnnotationAnnotatedType = classTransformer.getSyntheticAnnotationAnnotatedType(annotation.annotationType()); if (syntheticAnnotationAnnotatedType != null) { addMetaAnnotations(metaAnnotationMap, annotation, syntheticAnnotationAnnotatedType.getAnnotations(), declared); } else { addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getReflectionCache().getAnnotations(annotation.annotationType()), declared); ReflectionCache.AnnotationClass<?> annotationClass = classTransformer.getReflectionCache().getAnnotationClass(annotation.annotationType()); if (annotationClass.isRepeatableAnnotationContainer()) { processMetaAnnotations(metaAnnotationMap, annotationClass.getRepeatableAnnotations(annotation), classTransformer, declared); } } addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), declared); }
@Deprecated public Annotation[] getBindingsAsArray() { return getQualifiers().toArray(EMPTY_ANNOTATIONS); }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Collection<Annotation> annotations, ClassTransformer classTransformer, boolean declared) { for (Annotation annotation : annotations) { processMetaAnnotations(metaAnnotationMap, annotation, classTransformer, declared); } }
this.delegate = annotated; if (annotated instanceof AnnotatedType<?>) { this.rawType = Reflections.<AnnotatedType<T>>cast(annotated).getJavaClass(); } else { this.rawType = Reflections.getRawType(annotated.getBaseType()); throw ReflectionLogger.LOG.annotationMapNull(); this.annotationMap = immutableMapView(annotationMap); SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap = SetMultimap.newSetMultimap(); processMetaAnnotations(metaAnnotationMap, annotationMap.values(), classTransformer, false); this.metaAnnotationMap = Multimaps.unmodifiableMultimap(metaAnnotationMap);
public Set<Type> getInterfaceClosure() { Set<Type> interfaces = new HashSet<Type>(); for (Type t : getTypeClosure()) { if (Reflections.getRawType(t).isInterface()) { interfaces.add(t); } } return WeldCollections.immutableSetView(interfaces); }
@Deprecated public Set<Annotation> getQualifiers() { Set<Annotation> qualifiers = getMetaAnnotations(Qualifier.class); if (qualifiers.size() > 0) { return WeldCollections.immutableSetView(qualifiers); } else { return DEFAULT_QUALIFIERS; } }
protected void processMetaAnnotations(SetMultimap<Class<? extends Annotation>, Annotation> metaAnnotationMap, Annotation annotation, ClassTransformer classTransformer, boolean declared) { // WELD-1310 Include synthetic annotations SlimAnnotatedType<?> syntheticAnnotationAnnotatedType = classTransformer.getSyntheticAnnotationAnnotatedType(annotation.annotationType()); if (syntheticAnnotationAnnotatedType != null) { addMetaAnnotations(metaAnnotationMap, annotation, syntheticAnnotationAnnotatedType.getAnnotations(), declared); } else { addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getReflectionCache().getAnnotations(annotation.annotationType()), declared); ReflectionCache.AnnotationClass<?> annotationClass = classTransformer.getReflectionCache().getAnnotationClass(annotation.annotationType()); if (annotationClass.isRepeatableAnnotationContainer()) { processMetaAnnotations(metaAnnotationMap, annotationClass.getRepeatableAnnotations(annotation), classTransformer, declared); } } addMetaAnnotations(metaAnnotationMap, annotation, classTransformer.getTypeStore().get(annotation.annotationType()), declared); }