Examples of declareVariable()


Examples of com.facebook.presto.byteCode.CompilerContext.declareVariable()

                arg("blocks", com.facebook.presto.block.Block[].class),
                arg("pageBuilder", PageBuilder.class));

        CompilerContext compilerContext = filterAndProjectMethod.getCompilerContext();

        LocalVariableDefinition positionVariable = compilerContext.declareVariable(int.class, "position");

        LocalVariableDefinition rowsVariable = compilerContext.declareVariable(int.class, "rows");
        filterAndProjectMethod.getBody()
                .comment("int rows = blocks[0].getPositionCount();")
                .getVariable("blocks")
View Full Code Here

Examples of com.facebook.presto.byteCode.CompilerContext.declareVariable()

        CompilerContext compilerContext = filterAndProjectMethod.getCompilerContext();

        LocalVariableDefinition positionVariable = compilerContext.declareVariable(int.class, "position");

        LocalVariableDefinition rowsVariable = compilerContext.declareVariable(int.class, "rows");
        filterAndProjectMethod.getBody()
                .comment("int rows = blocks[0].getPositionCount();")
                .getVariable("blocks")
                .push(0)
                .getObjectArrayElement()
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionScope.declareVariable()

                    Value.class.getName() +
                    " (" + value.getClass().getName() + ")");
        } else {
            ExpandedName name = expandName(variable);

            scope.declareVariable(name, (Value)value);
        }
    }

    // javadoc inherited
    public boolean isDeclaredVariable(String variable) {
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionScope.declareVariable()

        for (Iterator iter = pendingVariableDeclarations.entrySet().iterator();
                iter.hasNext(); ) {
            final Map.Entry entry = (Map.Entry) iter.next();
            final ExpandedName name = (ExpandedName) entry.getKey();
            final Value initialValue = (Value) entry.getValue();
            expressionScope.declareVariable(name, initialValue);
        }
    }
}
View Full Code Here

Examples of com.volantis.xml.expression.InternalExpressionScope.declareVariable()

        PositionScope pc = expressionContext.getPositionScope();

        // Declare an unitialized variable.
        InternalExpressionScope scope = (InternalExpressionScope)
                expressionContext.getCurrentScope();
        Variable variable = scope.declareVariable(variableName);

        // Iterate over the sequence.
        int length = sequence.getLength();

        for (int i = 1; i <= length; i += 1) {
View Full Code Here

Examples of com.volantis.xml.expression.impl.SimpleExpressionScope.declareVariable()

                                                           scopeA);

        scopeA.declareVariable(nameX, x);

        try {
            scopeB.declareVariable(nameX, x2);
        } catch (IllegalArgumentException e) {
            fail("Declaring variable x in scope B should be OK even though " +
                 "it is declared in scope A");
        }
View Full Code Here

Examples of com.volantis.xml.expression.impl.SimpleExpressionScope.declareVariable()

        } catch (IllegalArgumentException e) {
            fail("Declaring another variable x but in a different namespace " +
                 "should not cause a problem");
        }

        scopeB.declareVariable(nameY, y);

        try {
            scopeB.declareVariable(nameY, x2);

            fail("Should have had an IllegalArgumentException when an " +
View Full Code Here

Examples of com.volantis.xml.expression.impl.SimpleExpressionScope.declareVariable()

        }

        scopeB.declareVariable(nameY, y);

        try {
            scopeB.declareVariable(nameY, x2);

            fail("Should have had an IllegalArgumentException when an " +
                 "attempt was made to redeclare the y variable in scope B");
        } catch (IllegalArgumentException e) {
            // Expected condition
View Full Code Here

Examples of com.volantis.xml.expression.impl.SimpleExpressionScope.declareVariable()

                                                           null);
        ExpressionScope scopeB = new SimpleExpressionScope(factory,
                                                           scopeA);

        scopeA.declareVariable(nameX, x);
        scopeB.declareVariable(nameX, x2);
        scopeA.declareVariable(nameX2, x2);
        scopeB.declareVariable(nameY, y);

        assertSame("Scope A's variable x should have been available",
                   x,
View Full Code Here

Examples of com.volantis.xml.expression.impl.SimpleExpressionScope.declareVariable()

                                                           scopeA);

        scopeA.declareVariable(nameX, x);
        scopeB.declareVariable(nameX, x2);
        scopeA.declareVariable(nameX2, x2);
        scopeB.declareVariable(nameY, y);

        assertSame("Scope A's variable x should have been available",
                   x,
                   scopeA.resolveVariable(nameX).getValue());
        assertSame("Scope A's variable x should be hidden",
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.