AnnotationStore create() { return new AnnotationStore(annotationMap, annotationSet); }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { return annotations.getAnnotation(annotationType); }
public Set<Annotation> getAnnotations() { return annotations.getAnnotations(); }
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { return annotations.isAnnotationPresent(annotationType); }
public AnnotationBuilder addAll(AnnotationStore annotations) { for (Annotation annotation : annotations.getAnnotations()) { add(annotation); } return this; }
protected AnnotatedImpl(Class<?> type, AnnotationStore annotations, Type genericType, Type overridenType) { if (overridenType == null) { if (genericType != null) { typeClosure = new HierarchyDiscovery(genericType).getTypeClosure(); this.type = genericType; } else { typeClosure = new HierarchyDiscovery(type).getTypeClosure(); this.type = type; } } else { this.type = overridenType; this.typeClosure = Collections.singleton(overridenType); } if (annotations == null) { this.annotations = new AnnotationStore(); } else { this.annotations = annotations; } }