Examples of StringLiteral


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

     * @param text literal text
     * @return string concatenation expression
     */
    public InfixExpressionBuilder buildStringConcatenation(String text) {
        InfixExpression expr = getAST().newInfixExpression();
        StringLiteral strlit = getAST().newStringLiteral();
        strlit.setLiteralValue(text);
        expr.setOperator(Operator.PLUS);
        return new InfixExpressionBuilder(this, expr, strlit);
    }
View Full Code Here

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

     *
     * @param value literal value
     * @return literal
     */
    public StringLiteral stringLiteral(String value) {
        StringLiteral literal = m_ast.newStringLiteral();
        literal.setLiteralValue(value);
        return literal;
    }
View Full Code Here

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

     *
     * @param value
     */
    public void setStringInitializer(String value) {
        VariableDeclarationFragment frag = (VariableDeclarationFragment)m_field.fragments().get(0);
        StringLiteral literal = m_ast.newStringLiteral();
        literal.setLiteralValue(value);
        frag.setInitializer(literal);
    }
View Full Code Here

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

     * Add a string literal operand to expression.
     *
     * @param value
     */
    public void addStringLiteralOperand(String value) {
        StringLiteral strlit = m_ast.newStringLiteral();
        strlit.setLiteralValue(value);
        addOperand(strlit);
    }
View Full Code Here

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

Examples of org.elegant.aash.comparator.parsing.expr.literal.StringLiteral

      }
      return expr;
    } else {
      String sText = stream.readString();
      if (sText != null) {
        return new StringLiteral(sText);
      } else {
        Double dValue = stream.readDouble();
        if (dValue != null) {
          return new DoubleLiteral(dValue);
        } else {
View Full Code Here

Examples of org.jpox.store.mapped.expression.StringLiteral

            return expr;
        }
        else if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_STRING))
        {
            // Return an StringLiteral to represent this Enum, but with the original value present just in case
            ScalarExpression expr = new StringLiteral(qs, this, ((Enum)value).name());
            ((Literal)expr).setRawValue(value);
            return expr;
        }
        else
        {
View Full Code Here

Examples of org.jpox.store.mapped.expression.StringLiteral

     * @param value The value of the literal
     * @return The Literal
     */
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        return new StringLiteral(qs, this, objectToString(value));
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.StringLiteral

        return ClassNameConstants.JAVA_LANG_STRING;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new StringLiteral(qs, this, ((StringBuffer)value).toString());
        return expr;
    }
View Full Code Here

Examples of org.jpox.store.mapped.expression.StringLiteral

        return mappingSampleValue;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new StringLiteral(qs, this, ((String)value));
        return expr;
    }
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.