Examples of StringLiteral


Examples of loop.ast.StringLiteral

      case INTEGER:
        return new IntLiteral(token.value);
      case LONG:
        return new LongLiteral(token.value);
      case STRING:
        return new StringLiteral(token.value);
      case REGEX:
        return new RegexLiteral(token.value);
    }

    if ("#t".equals(token.value) || "#true".equals(token.value))
View Full Code Here

Examples of lupos.datastructures.items.literal.string.StringLiteral

  public final static Literal readLuposLiteral(final ObjectInput in) throws IOException, ClassNotFoundException {
    if (LiteralFactory.getMapType() == MapType.NOCODEMAP
        || LiteralFactory.getMapType() == MapType.LAZYLITERAL
        || LiteralFactory.getMapType() == MapType.LAZYLITERALWITHOUTINITIALPREFIXCODEMAP
        || LiteralFactory.getMapType() == MapType.PREFIXCODEMAP) {
      return new StringLiteral((String) in.readObject());
    } else {
      return new CodeMapLiteral(InputHelper.readLuposInt(in));
    }
  }
View Full Code Here

Examples of net.sf.saxon.expr.StringLiteral

        }
        table = makeAttributeValueTemplate(dbTab);

        String dbWhere = getAttributeValue("", "where");
        if (dbWhere == null) {
            where = new StringLiteral(StringValue.EMPTY_STRING);
        } else {
            where = makeAttributeValueTemplate(dbWhere);
        }

        String connectAtt = getAttributeValue("", "connection");
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.ast.StringLiteral

        final Name covDataVar = new Name();
        covDataVar.setIdentifier(ScriptInstrumenter.COVERAGE_VARIABLE_NAME);

        inner.setTarget(covDataVar);

        final StringLiteral fileName = new StringLiteral();
        fileName.setValue(data.getSourceUriAsString());
        fileName.setQuoteCharacter('\'');

        inner.setElement(fileName);

        final NumberLiteral index = new NumberLiteral();
        index.setNumber(lineNr);
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.selector.expression.literal.StringLiteral

    private SelectorNode parseStringConstant()
    {
        String lValue = currentToken.substring(1,currentToken.length()-1); // strip starting and ending quote
        lValue = StringUtils.replaceDoubleSingleQuotes(lValue); // replace quotes inside string
        readNextToken(); // skip string constant
        return new StringLiteral(lValue);
    }
View Full Code Here

Examples of org.apache.expreval.expr.literal.StringLiteral

        if (val instanceof Double)
            return new DoubleLiteral((Double)val);

        if (val instanceof String)
            return new StringLiteral((String)val);

        if (val instanceof Date)
            return new DateLiteral((Date)val);

        if (val instanceof Object)
View Full Code Here

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

        if (ans[i].memberValuePairs().length == 0) {
          return ""; // empty pointcut expression
        }
        Expression expr = ans[i].memberValuePairs()[0].value;
        if (expr instanceof StringLiteral) {
          StringLiteral sLit = ((StringLiteral) expr);
          return new String(sLit.source());
        } else if (expr instanceof NameReference && (((NameReference) expr).binding instanceof FieldBinding)) {
          Binding b = ((NameReference) expr).binding;
          Constant c = ((FieldBinding) b).constant;
          return c.stringValue();
        } else {
View Full Code Here

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

  private String getStringLiteralFor(String memberName, Annotation inAnnotation, int[] location) {
    if (inAnnotation instanceof SingleMemberAnnotation && memberName.equals("value")) {
      SingleMemberAnnotation sma = (SingleMemberAnnotation) inAnnotation;
      if (sma.memberValue instanceof StringLiteral) {
        StringLiteral sv = (StringLiteral) sma.memberValue;
        location[0] = sv.sourceStart;
        location[1] = sv.sourceEnd;
        return new String(sv.source());
      } else if (sma.memberValue instanceof NameReference
          && (((NameReference) sma.memberValue).binding instanceof FieldBinding)) {
        Binding b = ((NameReference) sma.memberValue).binding;
        Constant c = ((FieldBinding) b).constant;
        return c.stringValue();
      }
    }
    if (!(inAnnotation instanceof NormalAnnotation))
      return null;
    NormalAnnotation ann = (NormalAnnotation) inAnnotation;
    MemberValuePair[] mvps = ann.memberValuePairs;
    if (mvps == null)
      return null;
    for (int i = 0; i < mvps.length; i++) {
      if (CharOperation.equals(memberName.toCharArray(), mvps[i].name)) {
        if (mvps[i].value instanceof StringLiteral) {
          StringLiteral sv = (StringLiteral) mvps[i].value;
          location[0] = sv.sourceStart;
          location[1] = sv.sourceEnd;
          return new String(sv.source());
        }
      }
    }
    return null;
  }
View Full Code Here

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

          SingleMemberAnnotation sma = (SingleMemberAnnotation) this.annotations[i];
          if (sma.memberValue instanceof ArrayInitializer) {
            ArrayInitializer memberValue = (ArrayInitializer) sma.memberValue;
            for (int j = 0; j < memberValue.expressions.length; j++) {
              if (memberValue.expressions[j] instanceof StringLiteral) {
                StringLiteral val = (StringLiteral) memberValue.expressions[j];
                if (new String(val.source()).equals(NOEXPLICITCONSTRUCTORCALL))
                  return true;
              }
            }
          }
        }
View Full Code Here

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

    long[] positions = new long[] {pos,pos,pos,pos,pos};
    TypeReference orgAspectJLangAnnotationAspect = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation atAspectAnnotation = new NormalAnnotation(orgAspectJLangAnnotationAspect,pos);
    if (!perclause.equals("")) {
      // we have to set the value
      Expression perclauseExpr = new StringLiteral(perclause.toCharArray(),pos,pos,1);
      MemberValuePair[] mvps = new MemberValuePair[1];
      mvps[0] = new MemberValuePair(value,pos,pos,perclauseExpr);
      atAspectAnnotation.memberValuePairs = mvps;
    }
    return atAspectAnnotation;
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.