Examples of ObjectLiteral


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

            }
            else
            {
                Object ver = stmt.getRDBMSManager().getApiAdapter().getVersionForObject(obj);
                JavaTypeMapping m = getMappingForClass(ver.getClass());
                return new ObjectLiteral(stmt, m, ver, null);
            }
        }
        else if (ObjectExpression.class.isAssignableFrom(expr.getClass()))
        {
            if (((ObjectExpression)expr).getJavaTypeMapping() instanceof PersistableMapping)
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

   */
  @Override
  protected List<String> retrieveConfigurationKeys(Node node) {   
    List<String> configurationKeys = new ArrayList<String>();

    ObjectLiteral objLiteral = configurationLiterals.get(node);
       
    if (objLiteral != null) {     
      configurationKeys = objLiteral.getKeys();
    }
   
    return configurationKeys;
  }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

   */
  @Override
  protected Object retrieveConfigurationValue(Node node, String key) {
    Object configuationValue = null;
   
    ObjectLiteral objLiteral = configurationLiterals.get(node);
   
    if (objLiteral != null) {
      configuationValue = objLiteral.getValue(key);               
    }
     
    return configuationValue;
  }   
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

   * @param configuration - Configuration declaration node
   * @param literal - Object literal node
   */
  protected void addConfigurationLiteral(Node configuration, Node literal) {
    try {
      configurationLiterals.put(configuration, new ObjectLiteral(literal));
    } catch (InvalidLiteralNode e) {
      logger.info("Invalid configuration literal discovered: " + literal.getType());
    }
  }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

   * @param packages - Module packages list
   */ 
  protected void updateInternalPathsConfig(ArrayLiteral packages) {
    for(Object packageInfo: packages.getValueList()) {
      if (packageInfo instanceof ObjectLiteral) {
        ObjectLiteral packageInfoLit = (ObjectLiteral) packageInfo;
        Object packagePath = packageInfoLit.getValue(DojoConfigAttrs.PACKAGES_LOCATION_CONFIG_FLAG),
           packageName = packageInfoLit.getValue(DojoConfigAttrs.PACKAGES_NAME_CONFIG_FLAG);
       
        if (packagePath instanceof String && packageName instanceof String) {
          modulePaths.put((String) packageName, (String) packagePath);
        }
      }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

  }     
 
  @Test(expected=InvalidLiteralNode.class)
  public void throwsExceptionWhenPassingNonLiteralNode() throws InvalidLiteralNode {         
    Node node = new Node(Token.SCRIPT);
    ObjectLiteral lit = new ObjectLiteral(node);   
  }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

    ce.setErrorReporter(errorReporter);
   
    Parser p = new Parser(ce, errorReporter);
    ScriptOrFnNode ast = p.parse(scriptSource, "script", 0);
   
    return new ObjectLiteral(ast.getFirstChild().getFirstChild().getFirstChild());
  }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

    }
  }
 
  @Test
  public void canParseEmptyLiteralNode() throws InvalidLiteralNode {   
    ObjectLiteral lit = getLiteralNode("{}");
    assertEquals(Collections.EMPTY_LIST, lit.getKeys());
 
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

    assertEquals(Collections.EMPTY_LIST, lit.getKeys());
 

  @Test
  public void detectsStringValuesInObjectLiteral() throws InvalidLiteralNode 
    ObjectLiteral lit = getLiteralNode("{ key: 'value', an: 'other'}");   
    assertEquals(Arrays.asList("key", "an"), lit.getKeys());
    assertValues(lit, getPrepopulatedMap("key", "value", "an", "other"));   
  }
View Full Code Here

Examples of org.dtk.analysis.script.node.ObjectLiteral

    assertValues(lit, getPrepopulatedMap("key", "value", "an", "other"));   
  }
 
  @Test
  public void detectsBooleanValuesInObjectLiteral() throws InvalidLiteralNode 
    ObjectLiteral lit = getLiteralNode("{ key: true, an: false}");   
    assertEquals(Arrays.asList("key", "an"), lit.getKeys());
    assertValues(lit, getPrepopulatedMap("key", Boolean.TRUE, "an", Boolean.FALSE));   
  }
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.