Package javax.lang.model.type

Examples of javax.lang.model.type.WildcardType


      } else {
        return processingEnv.getTypeUtils().getNoType(TypeKind.NONE);
      }
    }
    if (t1.getKind() == TypeKind.WILDCARD) {
      WildcardType wc1 = (WildcardType) t1;
      Type bound = (Type) wc1.getExtendsBound();
      if (bound == null) {
        // Implicit upper bound of java.lang.Object
        Elements elements = processingEnv.getElementUtils();
        return elements.getTypeElement("java.lang.Object").asType();
      }
      t1 = bound;
    }
    if (t2.getKind() == TypeKind.WILDCARD) {
      WildcardType wc2 = (WildcardType) t2;
      Type bound = (Type) wc2.getExtendsBound();
      if (bound == null) {
        // Implicit upper bound of java.lang.Object
        Elements elements = processingEnv.getElementUtils();
        return elements.getTypeElement("java.lang.Object").asType();
      }
View Full Code Here


          type = tvar.getUpperBound();
        } else {
          break;
        }
      } else if (type instanceof WildcardType) {
        WildcardType wc = (WildcardType) type;
        if (wc.getExtendsBound() != null) {
          type = wc.getExtendsBound();
        } else {
          break;
        }
      } else {
        break;
View Full Code Here

  private final TypeMirror mapType;

  public TypeUtils(ProcessingEnvironment env) {
    this.env = env;
    Types types = env.getTypeUtils();
    WildcardType wc = types.getWildcardType(null, null);
    this.collectionType = types.getDeclaredType(this.env.getElementUtils()
        .getTypeElement(Collection.class.getName()), wc);
    this.mapType = types.getDeclaredType(
        this.env.getElementUtils().getTypeElement(Map.class.getName()), wc, wc);
View Full Code Here

TOP

Related Classes of javax.lang.model.type.WildcardType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.