Package javax.lang.model.type

Examples of javax.lang.model.type.DeclaredType.asElement()


    AnnotationValue scopeValue = AnnotationProcessingUtil
        .getAnnotationElementValue(procEnv, annotation, "scope");

    DeclaredType referencedAnnotationClass = (DeclaredType) referencedAnnotationClassValue
        .getValue();
    TypeElement referencedAnnotationTypeElement = (TypeElement) referencedAnnotationClass
        .asElement();
    ConstraintScope scope = ConstraintScope.valueOf(scopeValue.getValue()
        .toString());
    Boolean nullable = Boolean.valueOf(nullableValue.getValue().toString());
    Map<Element, Set<Element>> elements = new HashMap<Element, Set<Element>>();
View Full Code Here


                                            + "\n\tA predicate field must be "
                                            + 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()
View Full Code Here

                                            .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 "
                                                + predicate);
                                    }
                                }
                            }
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

                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

                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);
                }
            }
            if (!ee.getParameters().isEmpty()) {
                warn("Method "
View Full Code Here

  Attribute.Compound anno = cast(Attribute.Compound.class, a);
  DeclaredType annotype = a.getAnnotationType();
  Map<MethodSymbol, Attribute> valmap = anno.getElementValues();

  for (ExecutableElement ex :
     methodsIn(annotype.asElement().getEnclosedElements())) {
      MethodSymbol meth = (MethodSymbol) ex;
      Attribute defaultValue = meth.getDefaultValue();
      if (defaultValue != null && !valmap.containsKey(meth)) {
    valmap.put(meth, defaultValue);
      }
View Full Code Here

                    return true;
            }
        }
        for (TypeMirror superIntf : d1.getInterfaces()) {
            DeclaredType declaredSuperIntf = (DeclaredType) superIntf;
            if (declaredSuperIntf.asElement().equals(d2)) {
                return true;
            }
            if (isSubElement((TypeElement) declaredSuperIntf.asElement(), d2)) {
                return true;
            } else if (superClassDecl != null && isSubElement(superClassDecl, d2)) {
View Full Code Here

        for (TypeMirror superIntf : d1.getInterfaces()) {
            DeclaredType declaredSuperIntf = (DeclaredType) superIntf;
            if (declaredSuperIntf.asElement().equals(d2)) {
                return true;
            }
            if (isSubElement((TypeElement) declaredSuperIntf.asElement(), d2)) {
                return true;
            } else if (superClassDecl != null && isSubElement(superClassDecl, d2)) {
                return true;
            }
        }
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.