Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.StringLiteral


          // @SuppressWarnings({ "Foo", "Bar"})
          ArrayInitializer ai = (ArrayInitializer) valueExpr;
          ImmutableSet.Builder valuesSetBuilder = ImmutableSet.builder();
          for (int i = 0, j = ai.expressions.length; i < j; i++) {
            if ((ai.expressions[i]) instanceof StringLiteral) {
              StringLiteral expression = (StringLiteral) ai.expressions[i];
              valuesSetBuilder.add(expression.constant.stringValue().toLowerCase(Locale.ENGLISH));
            } else {
              suppressionAnnotationWarning(a,
                  "Unable to analyze SuppressWarnings annotation, " +
                      ai.expressions[i].toString() + " not a string constant.");
View Full Code Here


          this.scanner.getCurrentTokenSource(),
          this.scanner.startPosition,
          this.scanner.currentPosition - 1));
      break;
    case TokenNameStringLiteral :
      StringLiteral stringLiteral;
      if (this.recordStringLiterals &&
          this.checkExternalizeStrings &&
          this.lastPosistion < this.scanner.currentPosition &&
          !this.statementRecoveryActivated) {
        stringLiteral = createStringLiteral(
View Full Code Here

}
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) {
  return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd);
}
protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
  return new StringLiteral(token, start, end, lineNumber);
}
View Full Code Here

    case TokenNameStringLiteral :
      if (this.recordStringLiterals &&
          this.checkExternalizeStrings &&
          this.lastPosistion < this.scanner.currentPosition &&
          !this.statementRecoveryActivated) {
        StringLiteral stringLiteral = createStringLiteral(
          this.scanner.getCurrentTokenSourceString(),
          this.scanner.startPosition,
          this.scanner.currentPosition - 1,
          Util.getLineNumber(this.scanner.startPosition, this.scanner.lineEnds, 0, this.scanner.linePtr));
        this.compilationUnit.recordStringLiteral(stringLiteral, this.currentElement != null);
View Full Code Here

          // @SuppressWarnings({ "Foo", "Bar"})
          ArrayInitializer ai = (ArrayInitializer) valueExpr;
          ImmutableSet.Builder valuesSetBuilder = ImmutableSet.builder();
          for (int i = 0, j = ai.expressions.length; i < j; i++) {
            if ((ai.expressions[i]) instanceof StringLiteral) {
              StringLiteral expression = (StringLiteral) ai.expressions[i];
              valuesSetBuilder.add(expression.constant.stringValue().toLowerCase(Locale.ENGLISH));
            } else {
              suppressionAnnotationWarning(a,
                  "Unable to analyze SuppressWarnings annotation, " +
                      ai.expressions[i].toString() + " not a string constant.");
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.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.