Examples of extend()


Examples of dk.brics.relaxng.converter.RestrRelaxNG2XMLGraph.extend()

    RNGParser rngparser = new RNGParser();
    RestrRelaxNG2XMLGraph rrng2xg = new RestrRelaxNG2XMLGraph(xg, datatypes);
    if (u.endsWith(".xsd")) {
      XMLSchema2RestrRelaxNG xsd2rrng = new XMLSchema2RestrRelaxNG(datatypes);
      if (extend)
        rrng2xg.extend(rngparser.parse(xsd2rrng.convert(url), url));
      else
        xg = rrng2xg.convert(rngparser.parse(xsd2rrng.convert(url), url));
      Map<String,String> m1 = xsd2rrng.getNameMap();
      Map<String,String> m2 = rngparser.getTopLevelNewNames();
      Map<String,SequenceNode> m3 = rrng2xg.getDefineNodes();
View Full Code Here

Examples of gov.nysenate.openleg.model.SOBIBlock.extend()

                    // No active block with a new matching line: create new block
                    block = new SOBIBlock(sobiFile, lineNum, line);
                }
                else if (block.getHeader().equals(headerMatcher.group()) && block.isMultiline()) {
                    // active multi-line block with a new matching line: extend block
                    block.extend(line);
                }
                else {
                    // active block does not match new line or can't be extended: create new block
                    blocks.add(block);
                    SOBIBlock newBlock = new SOBIBlock(sobiFile, lineNum, line);
View Full Code Here

Examples of gri.tasks.TaskDef.extend()

       
        TaskDefProvider provider = new BasicTaskDefProvider();
        TaskDef gridpTaskDef = provider.createTaskDef(function);
        //gridpTaskDef.insertPrefix("gridp:");
       
        gridpTaskDef.extend(baseTaskDef);
        return gridpTaskDef;
    }
    
    // ------------------------------------------------------ Implementation
   
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

            cf.addMethod(
                Modifier.PUBLIC,
                new MethodSignature(int.class, "getValue", null, null),
                "return 1;");

        mf.extend("return 2 * $_;", false);

        Object bean = cf.createClass().newInstance();

        assertEquals(new Integer(2), PropertyUtils.read(bean, "value"));
    }
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

            cf.addMethod(
                Modifier.PUBLIC,
                new MethodSignature(int.class, "getValue", null, null),
                "return 2;");

        mf.extend("$_ = 3 * $_;", false);

        Object bean = cf.createClass().newInstance();

        assertEquals(new Integer(6), PropertyUtils.read(bean, "value"));
    }
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

                new MethodSignature(int.class, "getValue", null, null),
                "return 1;");

        try
        {
            mf.extend("$_ =", true);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

        ClassFab cf = newClassFab("ExtendMethod", Object.class);

        MethodFab mf = cf.addMethod(Modifier.PUBLIC, new MethodSignature(int.class, "getValue",
                null, null), "return 1;");

        mf.extend("return 2 * $_;", false);

        Object bean = cf.createClass().newInstance();

        assertEquals(new Integer(2), PropertyUtils.read(bean, "value"));
    }
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

        ClassFab cf = newClassFab("ExtendMethodAlterReturn", Object.class);

        MethodFab mf = cf.addMethod(Modifier.PUBLIC, new MethodSignature(int.class, "getValue",
                null, null), "return 2;");

        mf.extend("$_ = 3 * $_;", false);

        Object bean = cf.createClass().newInstance();

        assertEquals(new Integer(6), PropertyUtils.read(bean, "value"));
    }
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

        MethodFab mf = cf.addMethod(Modifier.PUBLIC, new MethodSignature(int.class, "getValue",
                null, null), "return 1;");

        try
        {
            mf.extend("$_ =", true);
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(
View Full Code Here

Examples of org.apache.hivemind.service.MethodFab.extend()

                Modifier.PUBLIC + Modifier.FINAL + Modifier.SYNCHRONIZED,
                sig,
                "{ return _map; }");

        mf.addCatch(NullPointerException.class, "return null;");
        mf.extend("_map.clear();", true);

        String toString = cf.toString();

        contains(
                toString,
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.