Package javax.lang.model.element

Examples of javax.lang.model.element.TypeElement.asType()


        case INT:
          return foo(parameterVariableElt, parameterName, Cardinality.SINGLE, "int", "int");
        case DECLARED:
          DeclaredType dt = (DeclaredType)parameterTypeMirror;
          TypeElement col = context.processingContext.getTypeElement("java.util.List");
          TypeMirror tm = context.processingContext.erasure(col.asType());
          TypeMirror err = context.processingContext.erasure(dt);
          if (err.equals(tm)) {
            if (dt.getTypeArguments().size() != 1) {
              throw CONTROLLER_METHOD_PARAMETER_NOT_RESOLVED.failure(parameterVariableElt);
            } else {
View Full Code Here


    for ( AnnotationMirror oneAnnotationMirror : annotationMirrors ) {

      if ( typeUtils.isSameType(
          oneAnnotationMirror.getAnnotationType(),
          typeElement.asType()
      ) ) {
        return oneAnnotationMirror;
      }
    }
View Full Code Here

                                            + predicate);
                                } else {
                                    DeclaredType dt = (DeclaredType) rt;
                                    if (!processingEnv.getTypeUtils()
                                            .isSubtype(dt.asElement().asType(),
                                                    predicate.asType())) {
                                        warn("Field "
                                                + elementAsString(element)
                                                + "\n\tis prefixed with @Parameter(filter=true) and is "
                                                + dt.asElement().asType()
                                                + "\n\tA predicate field must be "
View Full Code Here

                        + "\n\tis prefixed with @Rule and is " + rt
                        + "\n\tA rule field must be " + testRule);
            } else {
                DeclaredType dt = (DeclaredType) rt;
                if (!processingEnv.getTypeUtils().isSubtype(
                        dt.asElement().asType(), testRule.asType())) {
                    warn("Field " + elementAsString(element)
                            + "\n\tis prefixed with @Rule and is "
                            + dt.asElement().asType()
                            + "\n\tA rule field must be " + testRule);
                }
View Full Code Here

                        + "\n\tis prefixed with @Parameters and return " + rt
                        + "\n\tThe parameters method must return " + stream);
            } else {
                DeclaredType dt = (DeclaredType) rt;
                if (!processingEnv.getTypeUtils().isSubtype(
                        dt.asElement().asType(), stream.asType())) {
                    warn("Method " + elementAsString(element)
                            + "\n\tis prefixed with @Parameters and return "
                            + dt.asElement().asType()
                            + "\n\tThe parameters method must return " + stream);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.