/** * Used when treating this as a parameter. * * @return The delegate. */ public TypeMirror getType() { return TypeMirrorDecorator.decorate(this.delegate, this.env); }
/** * Decorate a type mirror. * * @param typeMirror The mirror to decorate. * @param env The environment. * @return The decorated type mirror. */ public static <T extends TypeMirror> T decorate(T typeMirror, DecoratedProcessingEnvironment env) { if (typeMirror == null) { return null; } if (typeMirror instanceof DecoratedTypeMirror) { return typeMirror; } TypeMirrorDecorator<T> decorator = new TypeMirrorDecorator<T>(env); return typeMirror.accept(decorator, null); }
@Override public List<? extends TypeMirror> getInterfaces() { if (this.interfaces == null) { this.interfaces = TypeMirrorDecorator.decorate(this.delegate.getInterfaces(), env); } return this.interfaces; }
/** * Decorate a type mirror. * * @param typeMirror The mirror to decorate. * @param env The environment. * @return The decorated type mirror. */ public static <T extends TypeMirror> T decorate(T typeMirror, DecoratedProcessingEnvironment env) { if (typeMirror == null) { return null; } if (typeMirror instanceof DecoratedTypeMirror) { return typeMirror; } TypeMirrorDecorator<T> decorator = new TypeMirrorDecorator<T>(env); return typeMirror.accept(decorator, null); }
@Override public TypeMirror asType() { if (this.type == null) { this.type = TypeMirrorDecorator.decorate(delegate.asType(), env); } return this.type; }
@Override public TypeMirror getSuperclass() { if (this.superclass == null) { this.superclass = TypeMirrorDecorator.decorate(this.delegate.getSuperclass(), env); } return this.superclass; }
@Override public List<? extends TypeMirror> getInterfaces() { if (this.interfaces == null) { this.interfaces = TypeMirrorDecorator.decorate(this.delegate.getInterfaces(), env); } return this.interfaces; }
@Override public TypeMirror asType() { if (this.type == null) { this.type = TypeMirrorDecorator.decorate(delegate.asType(), env); } return this.type; }
@Override public TypeMirror getSuperclass() { if (this.superclass == null) { this.superclass = TypeMirrorDecorator.decorate(this.delegate.getSuperclass(), env); } return this.superclass; }
@Override public List<? extends TypeMirror> getTypeArguments() { return TypeMirrorDecorator.decorate(this.delegate.getTypeArguments(), env); }
@Override public List<? extends TypeMirror> getTypeArguments() { return TypeMirrorDecorator.decorate(this.delegate.getTypeArguments(), env); }
/** * Decorate a collection fo type mirrors. * * @param typeMirrors The type mirrors to decorate. * @param env The environment. * @return The collection of decorated type mirrors. */ public static <T extends TypeMirror> List<T> decorate(List<T> typeMirrors, DecoratedProcessingEnvironment env) { if (typeMirrors == null) { return null; } ArrayList<T> mirrors = new ArrayList<T>(typeMirrors.size()); for (T mirror : typeMirrors) { mirrors.add(decorate(mirror, env)); } return mirrors; }
/** * Decorate a collection fo type mirrors. * * @param typeMirrors The type mirrors to decorate. * @param env The environment. * @return The collection of decorated type mirrors. */ public static <T extends TypeMirror> List<T> decorate(List<T> typeMirrors, DecoratedProcessingEnvironment env) { if (typeMirrors == null) { return null; } ArrayList<T> mirrors = new ArrayList<T>(typeMirrors.size()); for (T mirror : typeMirrors) { mirrors.add(decorate(mirror, env)); } return mirrors; }
@Override public List<? extends TypeMirror> getBounds() { if (this.bounds == null) { this.bounds = TypeMirrorDecorator.decorate(this.delegate.getBounds(), env); } return this.bounds; }
/** * The min occurs of a web result. * * @return 1 if primitive. 0 otherwise. */ public int getMinOccurs() { DecoratedTypeMirror typeMirror = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(this.delegate, this.env); return typeMirror.isPrimitive() ? 1 : 0; }
@Override public TypeMirror getSuperBound() { return TypeMirrorDecorator.decorate(this.delegate.getSuperBound(), env); }
@Override public TypeMirror getLowerBound() { return TypeMirrorDecorator.decorate(this.delegate.getLowerBound(), env); }
@Override public List<? extends TypeVariable> getTypeVariables() { return TypeMirrorDecorator.decorate(this.delegate.getTypeVariables(), env); }
@Override public TypeMirror getReturnType() { return TypeMirrorDecorator.decorate(this.delegate.getReturnType(), env); }
@Override public TypeMirror getComponentType() { return TypeMirrorDecorator.decorate(this.delegate.getComponentType(), env); }