public AnnotationKey(Element element, Name type) { this.element = ElementHandle.create(element); this.type = type; }
public AnnotationKey(Element element, Name type) { this.element = ElementHandle.create(element); this.type = type; }
public AnnotationKey(Element element, AnnotationMirror mirror) { this.element = ElementHandle.create(element); this.type = Name.parse(((TypeElement)mirror.getAnnotationType().asElement()).getQualifiedName().toString()); }
public AnnotationKey(Element element, AnnotationMirror mirror) { this.element = ElementHandle.create(element); this.type = Name.parse(((TypeElement)mirror.getAnnotationType().asElement()).getQualifiedName().toString()); }
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (TypeElement annotationTypeElement : annotations) { for (Element element : roundEnv.getElementsAnnotatedWith(annotationTypeElement)) { ElementHandle<?> key = ElementHandle.create(element); HashMap<String, AnnotationState> states = statesMap.get(key); if (states == null) { statesMap.put(key, states = new HashMap<String, AnnotationState>()); } states.put(annotationTypeElement.asType().toString(), AnnotationState.get(element, annotationTypeElement.asType())); } } return false; } }
@Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (TypeElement annotationTypeElement : annotations) { for (Element element : roundEnv.getElementsAnnotatedWith(annotationTypeElement)) { ElementHandle<?> key = ElementHandle.create(element); HashMap<String, AnnotationState> states = statesMap.get(key); if (states == null) { statesMap.put(key, states = new HashMap<String, AnnotationState>()); } states.put(annotationTypeElement.asType().toString(), AnnotationState.get(element, annotationTypeElement.asType())); } } return false; } }