Package com.volantis.xml.expression

Examples of com.volantis.xml.expression.ExpressionScope


     * defined, this returns the global expression scope.
     *
     * @return the current expression scope
     */
    public ExpressionScope getCurrentScope() {
        ExpressionScope currentScope = globalScope;

        if (frames.size() > 0) {
            currentScope = (ExpressionScope)frames.peek();
        }

View Full Code Here


        return currentScope;
    }

    // javadoc inherited
    public void declareVariable(String variable, Object value) {
        ExpressionScope scope = getCurrentScope();

        if (scope == null) {
            throw new IllegalStateException(
                    "An attempt has been made to declare a variable " +
                    "while there is no current expression scope");
        } else if (!(value instanceof Value)) {
            throw new IllegalArgumentException(
                    "An attempt has been made to declare a variable " +
                    "with a value that doesn't implement " +
                    Value.class.getName() +
                    " (" + value.getClass().getName() + ")");
        } else {
            ExpandedName name = expandName(variable);

            scope.declareVariable(name, (Value)value);
        }
    }
View Full Code Here

        pendingVariableDeclarations.put(name, initialValue);
    }

    // javadoc inherited
    public void executePendingVariableDeclarations() {
        final ExpressionScope expressionScope =
            getPipelineContext().getExpressionContext().getCurrentScope();
        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

TOP

Related Classes of com.volantis.xml.expression.ExpressionScope

Copyright © 2018 www.massapicom. 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.