Examples of ObjectLiteral


Examples of com.google.minijoe.compiler.ast.ObjectLiteral

    ObjectLiteralProperty[] propertyArray = new ObjectLiteralProperty[propertyVector.size()];

    propertyVector.copyInto(propertyArray);

    return new ObjectLiteral(propertyArray);
  }
View Full Code Here

Examples of com.google.minijoe.compiler.ast.ObjectLiteral

  public void testObjectLiteral() throws CompilerException {
    assertParserOutput(
        new ExpressionStatement(
            new AssignmentExpression(
                new Identifier("foo"),
                new ObjectLiteral(
                    new ObjectLiteralProperty[] {}
                )
            )
        ),
        "foo = {};"
    );
    assertParserOutput(
        new ExpressionStatement(
            new AssignmentExpression(
                new Identifier("foo"),
                new ObjectLiteral(
                    new ObjectLiteralProperty[] {
                        new ObjectLiteralProperty(
                            new StringLiteral("name"),
                            new StringLiteral("wibble")
                        )
                    }
                )
            )
        ),
        "foo = {name: \"wibble\"};"
    );
    assertParserOutput(
        new ExpressionStatement(
            new AssignmentExpression(
                new Identifier("foo"),
                new ObjectLiteral(
                    new ObjectLiteralProperty[] {
                        new ObjectLiteralProperty(
                            new StringLiteral("name"),
                            new StringLiteral("wibble")
                        ),
View Full Code Here

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

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

        if (val instanceof Object)
            return new ObjectLiteral(val);

        throw new InvalidTypeException("Parameter " + this.getParamName()
                                       + " assigned an unsupported type " + val.getClass().getSimpleName());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

    // ------------------------------------- JDOQL Methods -------------------------------------------
   
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        return new ObjectLiteral(qs, this, value,getType());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

    // --------------------------------------- JDOQL Query Methods ------------------------------------------

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
       return new ObjectLiteral(qs, this, value, getType());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

    /* (non-Javadoc)
     * @see org.datanucleus.store.mapping.Mapping#newLiteral(org.datanucleus.store.QueryStatement, java.lang.Object)
     */
    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        return new ObjectLiteral(qs, this, value, value.getClass().getName());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

        if (mappingStrategy == ID_MAPPING || mappingStrategy == XCALIA_MAPPING)
        {
            NucleusLogger.QUERY.warn("Querying of reference (interface/Object) fields is not reliable " +
                "when mapped using \"xcalia\"/\"id\" mapping strategy - buy support and someone may provide it fully");
        }
        return new ObjectLiteral(qs, this, value, value.getClass().getName());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

        return OID.class;
    }

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
       return new ObjectLiteral(qs, this, value, getType());
    }
View Full Code Here

Examples of org.datanucleus.store.mapped.expression.ObjectLiteral

    // ---------------------------- JDOQL Query Methods --------------------------------------

    public ScalarExpression newLiteral(QueryExpression qs, Object value)
    {
        ScalarExpression expr = new ObjectLiteral(qs, this, value,getType());
        return expr;       
    }
View Full Code Here

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

                return new NullLiteral(stmt, null, null, null);
            }
            else
            {
                JavaTypeMapping m = getMappingForClass(id.getClass());
                return new ObjectLiteral(stmt, m, id, null);
            }
        }
        else if (ObjectExpression.class.isAssignableFrom(expr.getClass()))
        {
            // When the expression represents a PC object need to extract out as the identity
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.