Examples of CompiledExpression


Examples of org.mvel2.compiler.CompiledExpression

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        CompiledExpression compexpr = (CompiledExpression) this.expr;

        if ( MVELDebugHandler.isDebugMode() ) {
            if ( MVELDebugHandler.verbose ) {
                logger.info(DebugTools.decompile(compexpr));
            }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg
                    .getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        CompiledExpression compexpr = (CompiledExpression) this.expr;

        pkg = knowledgeHelper.getWorkingMemory().getRuleBase().getPackage(knowledgeHelper.getRule().getPackage() );

        ClassLoader tempClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader( ((InternalRuleBase) workingMemory.getRuleBase()).getRootClassLoader() );

        try {
            if ( MVELDebugHandler.isDebugMode() ) {
                if ( MVELDebugHandler.verbose ) {
                    System.out.println( "Executing expression " + compexpr.getSourceName() );
                    System.out.println( DebugTools.decompile( compexpr ) );
                }
                MVEL.executeDebugger( compexpr,
                                      null,
                                      factory );
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        MvelContext mCon = new MvelContext();
        mCon.setInitialContext( initialContext );

        try {
            ExpressionCompiler compiler = new ExpressionCompiler( macroMvel );
            CompiledExpression expression = compiler.compile( initialContext );
            mCon.setExpression( expression );

            ParserContext compilationContext = compiler.getParserContextState();

            Class lastType = expression.getKnownEgressType();

            //Statics expression may return Class as an egress type
            if ( lastType != null && "java.lang.Class".equals( lastType.getName() ) ) {
                mCon.setStaticFlag( true );
            }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        CompiledExpression compexpr = (CompiledExpression) this.expr;

        if ( MVELDebugHandler.isDebugMode() ) {
            if ( MVELDebugHandler.verbose ) {
                logger.info(DebugTools.decompile(compexpr));
            }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        CompiledExpression compexpr = (CompiledExpression) this.expr;

        //Receive breakpoints from debugger
        MVELDebugHandler.prepare();

        Object value;
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        if ( pkg != null ) {
            MVELDialectRuntimeData data = (MVELDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( this.id );
            factory.setNextFactory( data.getFunctionFactory() );
        }

        CompiledExpression compexpr = (CompiledExpression) this.expr;

        pkg = knowledgeHelper.getWorkingMemory().getRuleBase().getPackage(knowledgeHelper.getRule().getPackage() );

        ClassLoader tempClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader( ((InternalRuleBase) workingMemory.getRuleBase()).getRootClassLoader() );

        try {
            if ( MVELDebugHandler.isDebugMode() ) {
                if ( MVELDebugHandler.verbose ) {
                    System.out.println( "Executing expression " + compexpr.getSourceName() );
                    System.out.println( DebugTools.decompile( compexpr ) );
                }
                MVEL.executeDebugger( compexpr,
                                      knowledgeHelper,
                                      factory );
View Full Code Here

Examples of org.mvel2.compiler.CompiledExpression

        if ( pkg != null ) {
            MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) pkg.getDialectRuntimeRegistry().getDialectData( id );
            factory.setNextFactory( data.getFunctionFactory() );
        }       
       
        CompiledExpression compexpr = (CompiledExpression) this.expr;

        if ( MVELDebugHandler.isDebugMode() ) {
            if ( MVELDebugHandler.verbose ) {
                System.out.println( DebugTools.decompile( compexpr ) );
            }
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.