@Override public Element getEnclosingElement() { if (this.enclosingElement == null) { this.enclosingElement = ElementDecorator.decorate(delegate.getEnclosingElement(), env); } return this.enclosingElement; }
public List<? extends AnnotationMirror> getAnnotationMirrors() { if (this.annotationMirrors == null) { this.annotationMirrors = ElementDecorator.decorateAnnotationMirrors(delegate.getAnnotationMirrors(), env); } return this.annotationMirrors; }
/** * Decorates a declaration. * * @param element The declaration to decorate. * @param env The processing environment. * @return The decorated declaration. */ public static <E extends Element> E decorate(E element, DecoratedProcessingEnvironment env) { if (element == null) { return null; } if (element instanceof DecoratedElement) { return element; } ElementDecorator<E> decorator = new ElementDecorator<E>(env); return element.accept(decorator, null); }
/** * Decorates a declaration. * * @param element The declaration to decorate. * @param env The processing environment. * @return The decorated declaration. */ public static <E extends Element> E decorate(E element, DecoratedProcessingEnvironment env) { if (element == null) { return null; } if (element instanceof DecoratedElement) { return element; } ElementDecorator<E> decorator = new ElementDecorator<E>(env); return element.accept(decorator, null); }
@Override public List<? extends Element> getEnclosedElements() { if (this.enclosedElements == null) { this.enclosedElements = ElementDecorator.decorate(delegate.getEnclosedElements(), env); } return this.enclosedElements; }
public List<? extends AnnotationMirror> getAnnotationMirrors() { if (this.annotationMirrors == null) { this.annotationMirrors = ElementDecorator.decorateAnnotationMirrors(delegate.getAnnotationMirrors(), env); } return this.annotationMirrors; }
@Override public Element getEnclosingElement() { if (this.enclosingElement == null) { this.enclosingElement = ElementDecorator.decorate(delegate.getEnclosingElement(), env); } return this.enclosingElement; }
public List<? extends AnnotationMirror> getAnnotationMirrors() { if (this.annotationMirrors == null) { this.annotationMirrors = ElementDecorator.decorateAnnotationMirrors(delegate.getAnnotationMirrors(), env); } return this.annotationMirrors; }
@Override public List<? extends Element> getEnclosedElements() { if (this.enclosedElements == null) { this.enclosedElements = ElementDecorator.decorate(delegate.getEnclosedElements(), env); } return this.enclosedElements; }
public List<? extends AnnotationMirror> getAnnotationMirrors() { if (this.annotationMirrors == null) { this.annotationMirrors = ElementDecorator.decorateAnnotationMirrors(delegate.getAnnotationMirrors(), env); } return this.annotationMirrors; }
@Override public TypeElement getTypeElement(CharSequence name) { return ElementDecorator.decorate(delegate.getTypeElement(name), this.env); }
@Override public List<? extends AnnotationMirror> getAllAnnotationMirrors(Element e) { while (e instanceof DecoratedElement) { e = ((DecoratedElement) e).getDelegate(); } return e instanceof ElementAdaptor ? ((ElementAdaptor)e).getAllAnnotationMirrors() : ElementDecorator.decorateAnnotationMirrors(delegate.getAllAnnotationMirrors(e), this.env); }
@Override public Element asElement() { return ElementDecorator.decorate(this.delegate.asElement(), this.env); }
@Override public List<? extends AnnotationMirror> getAllAnnotationMirrors(Element e) { while (e instanceof DecoratedElement) { e = ((DecoratedElement) e).getDelegate(); } return e instanceof ElementAdaptor ? ((ElementAdaptor)e).getAllAnnotationMirrors() : ElementDecorator.decorateAnnotationMirrors(delegate.getAllAnnotationMirrors(e), this.env); }
@Override public Element asElement() { return ElementDecorator.decorate(this.delegate.asElement(), this.env); }
@Override public TypeElement getTypeElement(CharSequence name) { return ElementDecorator.decorate(delegate.getTypeElement(name), this.env); }
public List<ExecutableElement> getMethods() { if (this.methods == null) { this.methods = ElementDecorator.decorate(ElementFilter.methodsIn(this.delegate.getEnclosedElements()), this.env); } return this.methods; }
public List<ExecutableElement> getMethods() { if (this.methods == null) { this.methods = ElementDecorator.decorate(ElementFilter.methodsIn(this.delegate.getEnclosedElements()), this.env); } return this.methods; }
@Override public Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a) { Set<Element> decorated = new HashSet<Element>(); for (Element element : this.delegate.getElementsAnnotatedWith(a)) { decorated.add(ElementDecorator.decorate(element, this.env)); } return decorated; } }
@Override public Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a) { Set<Element> decorated = new HashSet<Element>(); for (Element element : this.delegate.getElementsAnnotatedWith(a)) { decorated.add(ElementDecorator.decorate(element, this.env)); } return decorated; } }