Examples of StringLiteral


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

    char[][] typeName = new char[][] {org,aspectj,internal,lang,annotation,itdAnnotation};
    long[] positions = new long[typeName.length];
    for (int i = 0; i < positions.length; i++) positions[i] = pos;
    TypeReference annType = new QualifiedTypeReference(typeName,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression targetExpr = new StringLiteral(targetTypeName,pos,pos,1);
    Expression nameExpr = new StringLiteral(name,pos,pos,1);
    Expression modsExpr = new IntLiteral(Integer.toString(modifiers).toCharArray(),pos,pos);
    MemberValuePair[] mvps = new MemberValuePair[3];
    mvps[0] = new MemberValuePair("targetType".toCharArray(),pos,pos,targetExpr);
    mvps[1] = new MemberValuePair("name".toCharArray(),pos,pos,nameExpr);
    mvps[2] = new MemberValuePair("modifiers".toCharArray(),pos,pos,modsExpr);
View Full Code Here

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

  private static Annotation makeSingleStringMemberAnnotation(char[][] name, int pos, String annValue) {
    long[] positions = new long[name.length];
    for (int i = 0; i < positions.length; i++) positions[i] = pos;
    TypeReference annType = new QualifiedTypeReference(name,positions);
    NormalAnnotation ann = new NormalAnnotation(annType,pos);
    Expression valueExpr = new StringLiteral(annValue.toCharArray(),pos,pos,1);
    MemberValuePair[] mvps = new MemberValuePair[1];
    mvps[0] = new MemberValuePair(value,pos,pos,valueExpr);
    ann.memberValuePairs = mvps;
    return ann;   
  }
View Full Code Here

Examples of org.candle.decompiler.intermediate.expression.StringLiteral

    Type type = instruction.getType(cpg);
    Object instructionValue = instruction.getValue(cpg);
   
    if(Type.STRING == type) {
      Expression resolved = new StringLiteral(context.getCurrentInstruction(), instructionValue.toString());
      context.getExpressions().push(resolved);
      return;
    }
    else {
     
View Full Code Here

Examples of org.datanucleus.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.datanucleus.store.rdbms.sql.expression.StringLiteral

                String nuctypeName = cls.getType();
                if (maxClassNameLength > nuctypeName.length())
                {
                    nuctypeName = StringUtils.leftAlignedPaddedString(nuctypeName, maxClassNameLength);
                }
                StringLiteral lit = new StringLiteral(tblStmt, m, nuctypeName, null);
                tblStmt.select(lit, UnionStatementGenerator.NUC_TYPE_COLUMN);

                if (stmt == null)
                {
                    stmt = tblStmt;
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringLiteral

        if (expr instanceof SQLLiteral)
        {
            // Just convert the literal value directly
            if (((SQLLiteral)expr).getValue() == null)
            {
                return new StringLiteral(expr.getSQLStatement(), m, null, null);
            }
            return new StringLiteral(expr.getSQLStatement(), m, ((SQLLiteral)expr).getValue().toString(), null);
        }

        List args = new ArrayList();
        args.add(expr);
        List types = new ArrayList();
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringLiteral

        if (expr instanceof SQLLiteral)
        {
            // Just convert the literal value directly
            if (((SQLLiteral)expr).getValue() == null)
            {
                return new StringLiteral(expr.getSQLStatement(), m, null, null);
            }
            return new StringLiteral(expr.getSQLStatement(), m, ((SQLLiteral)expr).getValue().toString(), null);
        }

        List args = new ArrayList();
        args.add(expr);
        List types = new ArrayList();
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringLiteral

                String nuctypeName = className;
                if (maxClassNameLength > nuctypeName.length())
                {
                    nuctypeName = StringUtils.leftAlignedPaddedString(nuctypeName, maxClassNameLength);
                }
                StringLiteral lit = new StringLiteral(stmt, m, nuctypeName, null);
                stmt.select(lit, NUC_TYPE_COLUMN);
            /*}*/
        }
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringLiteral

    public SQLExpression getExpression(SQLExpression expr, List args)
    {
        if (expr instanceof StringLiteral)
        {
            String val = (String)((StringLiteral)expr).getValue();
            return new StringLiteral(stmt, expr.getJavaTypeMapping(), val.toUpperCase(), null);
        }
        return super.getExpression(expr, args);
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.StringLiteral

    public SQLExpression getExpression(SQLExpression expr, List args)
    {
        if (expr instanceof EnumLiteral)
        {
            Enum val = (Enum)((EnumLiteral)expr).getValue();
            return new StringLiteral(stmt,
                exprFactory.getMappingForType(String.class, false), val.toString(), null);
        }
        else if (expr instanceof EnumExpression)
        {
            EnumExpression enumExpr = (EnumExpression)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.