Examples of newSingleMemberAnnotation()


Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      switch (type)
      {
      case MARKER:
         return ast.newMarkerAnnotation();
      case SINGLE:
         return ast.newSingleMemberAnnotation();
      case NORMAL:
         return ast.newNormalAnnotation();
      default:
         throw new IllegalArgumentException("Unknown annotation type: " + type);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      switch (type)
      {
      case MARKER:
         return ast.newMarkerAnnotation();
      case SINGLE:
         return ast.newSingleMemberAnnotation();
      case NORMAL:
         return ast.newNormalAnnotation();
      default:
         throw new IllegalArgumentException("Unknown annotation type: " + type);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      switch (type)
      {
      case MARKER:
         return ast.newMarkerAnnotation();
      case SINGLE:
         return ast.newSingleMemberAnnotation();
      case NORMAL:
         return ast.newNormalAnnotation();
      default:
         throw new IllegalArgumentException("Unknown annotation type: " + type);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

        MarkerAnnotation markerAnnotation =
            annotation(declaration, MarkerAnnotation.class);
        if (markerAnnotation != null) {
            AST ast = markerAnnotation.getAST();
            if (value != QualifiedNameValue.DEFAULT_VALUE) {
                SingleMemberAnnotation replacementAnnotation = ast.newSingleMemberAnnotation();
                replacementAnnotation.setTypeName(ast.newName(markerAnnotation.getTypeName().getFullyQualifiedName()));
                Expression memberValueExpression = 
                    value != null? AstUtils.createExpression(
                            ast, value): null;
                replacementAnnotation.setValue(memberValueExpression);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      switch (type)
      {
      case MARKER:
         return ast.newMarkerAnnotation();
      case SINGLE:
         return ast.newSingleMemberAnnotation();
      case NORMAL:
         return ast.newNormalAnnotation();
      default:
         throw new IllegalArgumentException("Unknown annotation type: " + type);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      switch (type)
      {
      case MARKER:
         return ast.newMarkerAnnotation();
      case SINGLE:
         return ast.newSingleMemberAnnotation();
      case NORMAL:
         return ast.newNormalAnnotation();
      default:
         throw new IllegalArgumentException("Unknown annotation type: " + type);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

    String qualifiedName = Qualifier.class.getName();
    if (!ProposalCalculatorUtil.containsImport(getCompilationUnit(), qualifiedName)) {
      importRewrite.addImport(qualifiedName);
    }

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("Qualifier"));
    StringLiteral literal = ast.newStringLiteral();
    // literal.setLiteralValue(qualifier);
    annotation.setValue(literal);
    ITrackedNodePosition position = astRewrite.track(literal);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

        CompilationUnit astRoot = ASTResolving.findParentCompilationUnit(decl);
        ImportRewrite importRewrite = createImportRewrite(astRoot);
        importRewrite.addImport(requestMappingTypeName);
      }

      SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
      annotation.setTypeName(ast.newSimpleName("PathVariable"));
      StringLiteral pathVariableName = ast.newStringLiteral();
      pathVariableName.setLiteralValue(variableName);
      ITrackedNodePosition trackPathVariable = rewrite.track(pathVariableName);
      addLinkedPosition(new StringLiteralTrackedPosition(trackPathVariable), true, "PathVariable");
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

    SimpleName variableName = ast.newSimpleName(variable.getVariableName());
    paramDecl.setName(variableName);
    addLinkedPosition(astRewrite.track(variableName), false, "variableName");

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("PathVariable"));

    StringLiteral pathVariableName = ast.newStringLiteral();
    pathVariableName.setLiteralValue(variable.getVariableName());
    annotation.setValue(pathVariableName);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newSingleMemberAnnotation()

      importRewrite.addImport(importName);
    }

    Annotation annotation;
    if (annotationClass.equals(PathVariable.class)) {
      SingleMemberAnnotation sAnnotation = ast.newSingleMemberAnnotation();
      StringLiteral paramName = ast.newStringLiteral();
      paramName.setLiteralValue(param.getName().getFullyQualifiedName());
      sAnnotation.setValue(paramName);

      addLinkedPosition(new StringLiteralTrackedPosition(astRewrite.track(paramName)), true, "paramValue");
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.