Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.NormalAnnotation.values()


      LocationInformation locationInfo = null;
      if (node instanceof NormalAnnotation) {
        NormalAnnotation normalAnnotation = (NormalAnnotation) node;
        @SuppressWarnings("unchecked")
        List<MemberValuePair> pairs = normalAnnotation.values();

        for (MemberValuePair pair : pairs) {
          Expression expression = pair.getValue();
          if (expression instanceof StringLiteral) {
            locationInfo = getLocationInformation((StringLiteral) expression, javaContext);
View Full Code Here


      LocationInformation locationInfo = null;
      if (node instanceof NormalAnnotation) {
        NormalAnnotation normalAnnotation = (NormalAnnotation) node;
        @SuppressWarnings("unchecked")
        List<MemberValuePair> pairs = normalAnnotation.values();

        for (MemberValuePair pair : pairs) {
          Expression expression = pair.getValue();
          if (expression instanceof StringLiteral) {
            locationInfo = getLocationInformation((StringLiteral) expression, javaContext);
View Full Code Here

        }
      }
      else if (annotation.isNormalAnnotation()) {
        NormalAnnotation nAnnotation = (NormalAnnotation) annotation;
        @SuppressWarnings("unchecked")
        List<MemberValuePair> valuePairs = nAnnotation.values();
        for (MemberValuePair valuePair : valuePairs) {
          if ("value".equals(valuePair.getName().getIdentifier())) {
            Expression value = valuePair.getValue();
            if (value instanceof StringLiteral) {
              return ((StringLiteral) value).getLiteralValue();
View Full Code Here

  public static MemberValuePair getRequiredMemberValuePair(BodyDeclaration decl) {
    Set<Annotation> annotations = ProposalCalculatorUtil.findAnnotations("Autowired", decl);
    for (Annotation annotation : annotations) {
      if (annotation instanceof NormalAnnotation) {
        NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
        List<MemberValuePair> values = normalAnnotation.values();
        for (MemberValuePair valuePair : values) {
          if ("required".equals(valuePair.getName().toString())) {
            return valuePair;
          }
        }
View Full Code Here

      newAnnotation.setTypeName(ast.newSimpleName(annotation.getTypeName().getFullyQualifiedName()));

      MemberValuePair requiredValue = ast.newMemberValuePair();
      requiredValue.setName(ast.newSimpleName("required"));
      requiredValue.setValue(ast.newBooleanLiteral(false));
      newAnnotation.values().add(requiredValue);

      astRewrite.replace(annotation, newAnnotation, null);
    }

    return astRewrite;
View Full Code Here

      SingleMemberAnnotation sAnnotation = (SingleMemberAnnotation) annotation;
      return getUriTemplateVariables(sAnnotation.getValue());
    }
    else if (annotation instanceof NormalAnnotation) {
      NormalAnnotation nAnnotation = (NormalAnnotation) annotation;
      List<MemberValuePair> pairs = nAnnotation.values();
      for (MemberValuePair pair : pairs) {
        if ("value".equals(pair.getName().getFullyQualifiedName())) {
          return getUriTemplateVariables(pair.getValue());
        }
      }
View Full Code Here

      LocationInformation locationInfo = null;
      if (node instanceof NormalAnnotation) {
        NormalAnnotation normalAnnotation = (NormalAnnotation) node;
        @SuppressWarnings("unchecked")
        List<MemberValuePair> pairs = normalAnnotation.values();

        for (MemberValuePair pair : pairs) {
          Expression expression = pair.getValue();
          if (expression instanceof StringLiteral) {
            locationInfo = getLocationInformation((StringLiteral) expression, javaContext);
View Full Code Here

        case REQUIRED:
          MemberValuePair requiredValue = ast.newMemberValuePair();
          requiredValue.setName(ast.newSimpleName("required"));
          requiredValue.setValue(ast.newBooleanLiteral(false));
          addLinkedPosition(astRewrite.track(requiredValue.getValue()), i == 0, "Autowire");
          autowiredAnnotation.values().add(requiredValue);
          break;
        // case QUALIFIER:
        // SingleMemberAnnotation qualifierAnnotation =
        // (SingleMemberAnnotation) createAnnotation(
        // Qualifier.class.getCanonicalName(),
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.