Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.StringLiteral


      importRewrite.addImport(importName);
    }

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    annotation.setTypeName(ast.newSimpleName("PathVariable"));
    StringLiteral pathVariableName = ast.newStringLiteral();
    pathVariableName.setLiteralValue(variable.getVariableName());
    annotation.setValue(pathVariableName);

    astRewrite.getListRewrite(param, SingleVariableDeclaration.MODIFIERS2_PROPERTY).insertFirst(annotation, null);

    final ITrackedNodePosition literalPosition = astRewrite.track(variable.getNode());
View Full Code Here


      importRewrite.addImport(qualifierTypeName);
    }

    SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
    SimpleName typeName = ast.newSimpleName("Qualifier");
    StringLiteral beanValue = ast.newStringLiteral();
    // beanValue.setLiteralValue("beanName");
    annotation.setTypeName(typeName);
    // SimpleName beanValue = ast.newSimpleName("beanName");
    annotation.setValue(beanValue);
View Full Code Here

          Set<Annotation> annotations = ProposalCalculatorUtil.findAnnotations("PathVariable", varDecl);
          SimpleName varDeclName = varDecl.getName();
          String varName = varDeclName.getFullyQualifiedName();

          String pathVariableName = varName;
          StringLiteral pathVariableLiteral = null;

          for (Annotation annotation : annotations) {
            if (annotation instanceof SingleMemberAnnotation) {
              Expression value = ((SingleMemberAnnotation) annotation).getValue();
              if (value instanceof StringLiteral) {
                pathVariableLiteral = ((StringLiteral) value);
                pathVariableName = pathVariableLiteral.getLiteralValue();
                break;
              }
            }
          }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.StringLiteral

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.