Examples of ParserConfiguration


Examples of org.mvel2.ParserConfiguration

                                                      MVELDialect dialect) {

        //Lookup ParserConfiguration to retrieve imports and package imports
        PackageRegistry packageRegistry = dialect.getPackageRegistry();
        MVELDialectRuntimeData data = (MVELDialectRuntimeData) packageRegistry.getDialectRuntimeRegistry().getDialectData( dialect.getId() );
        ParserConfiguration pconf = data.getParserConfiguration();

        final ParserContext context = new ParserContext( pconf.getImports(),
                                                         null,
                                                         qualifiedName );

        if ( pconf.getPackageImports() != null ) {
            for ( Iterator it = pconf.getPackageImports().iterator(); it.hasNext(); ) {
                String packageImport = (String) it.next();
                context.addPackageImport( packageImport );
            }
        }
        context.setStrictTypeEnforcement( false );
View Full Code Here

Examples of org.mvel2.ParserConfiguration

                                                      MVELDialect dialect) {

        //Lookup ParserConfiguration to retrieve imports and package imports
        PackageRegistry packageRegistry = dialect.getPackageRegistry();
        MVELDialectRuntimeData data = (MVELDialectRuntimeData) packageRegistry.getDialectRuntimeRegistry().getDialectData( dialect.getId() );
        ParserConfiguration pconf = data.getParserConfiguration();

        final ParserContext context = new ParserContext( pconf.getImports(),
                                                         null,
                                                         qualifiedName );

        if ( pconf.getPackageImports() != null ) {
            for (String packageImport : pconf.getPackageImports()) {
                context.addPackageImport( packageImport );
            }
        }
        context.setStrictTypeEnforcement( false );
View Full Code Here

Examples of org.mvel2.ParserConfiguration

    protected void createMvelConditionEvaluator(InternalWorkingMemory workingMemory) {
        if (compilationUnit != null) {
            MVELDialectRuntimeData data = getMVELDialectRuntimeData(workingMemory);
            ExecutableStatement statement = (ExecutableStatement)compilationUnit.getCompiledExpression(data);
            ParserConfiguration configuration = statement instanceof CompiledExpression ?
                    ((CompiledExpression)statement).getParserConfiguration() :
                    data.getParserConfiguration();
            conditionEvaluator = new MvelConditionEvaluator(compilationUnit, configuration, statement, declarations, getAccessedClass());
        } else {
            conditionEvaluator = new MvelConditionEvaluator(getParserConfiguration(workingMemory), expression, declarations, getAccessedClass());
View Full Code Here

Examples of org.mvel2.ParserConfiguration

    private void setInputs( RuleBuildContext context,
                            ExprBindings descrBranch,
                            Class< ? > thisClass,
                            String expr ) {
        MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
        ParserConfiguration conf = data.getParserConfiguration();

        conf.setClassLoader( context.getPackageBuilder().getRootClassLoader() );

        final ParserContext pctx = new ParserContext( conf );
        pctx.setStrictTypeEnforcement( false );
        pctx.setStrongTyping( false );
        pctx.addInput( "this",
View Full Code Here

Examples of org.mvel2.ParserConfiguration

            MVEL.COMPILER_OPT_ALLOW_OVERRIDE_ALL_PROPHANDLING = true;
            MVEL.COMPILER_OPT_ALLOW_RESOLVE_INNERCLASSES_WITH_DOTNOTATION = true;
            MVEL.COMPILER_OPT_SUPPORT_JAVA_STYLE_CLASS_LITERALS = true;

            MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
            ParserConfiguration pconf = data.getParserConfiguration();
            ParserContext pctx = new ParserContext( pconf );

            Object o = MVEL.executeExpression( MVEL.compileExpression( value,
                                                                       pctx ) );
            if ( o != null && vtype == null ) {
View Full Code Here

Examples of org.mvel2.ParserConfiguration

    protected void setInputs( RuleBuildContext context,
                            ExprBindings descrBranch,
                            Class< ? > thisClass,
                            String expr ) {
        MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
        ParserConfiguration conf = data.getParserConfiguration();

        conf.setClassLoader( context.getKnowledgeBuilder().getRootClassLoader() );

        final ParserContext pctx = new ParserContext( conf );
        pctx.setStrictTypeEnforcement(false);
        pctx.setStrongTyping( false );
        pctx.addInput( "this",
View Full Code Here

Examples of org.mvel2.ParserConfiguration

            MVEL.COMPILER_OPT_ALLOW_OVERRIDE_ALL_PROPHANDLING = true;
            MVEL.COMPILER_OPT_ALLOW_RESOLVE_INNERCLASSES_WITH_DOTNOTATION = true;
            MVEL.COMPILER_OPT_SUPPORT_JAVA_STYLE_CLASS_LITERALS = true;

            MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
            ParserConfiguration pconf = data.getParserConfiguration();
            ParserContext pctx = new ParserContext( pconf );

            Object o = MVELSafeHelper.getEvaluator().executeExpression( MVEL.compileExpression( value,
                    pctx ) );
            if ( o != null && vtype == null ) {
View Full Code Here

Examples of org.mvel2.ParserConfiguration

    protected void createMvelConditionEvaluator(InternalWorkingMemory workingMemory) {
        if (compilationUnit != null) {
            MVELDialectRuntimeData data = getMVELDialectRuntimeData(workingMemory);
            ExecutableStatement statement = (ExecutableStatement)compilationUnit.getCompiledExpression(data);
            ParserConfiguration configuration = statement instanceof CompiledExpression ?
                    ((CompiledExpression)statement).getParserConfiguration() :
                    data.getParserConfiguration();
            conditionEvaluator = new MvelConditionEvaluator(compilationUnit, configuration, statement, declarations, getAccessedClass());
        } else {
            conditionEvaluator = new MvelConditionEvaluator(getParserConfiguration(workingMemory), expression, declarations, getAccessedClass());
View Full Code Here

Examples of org.mvel2.ParserConfiguration

        this.populatedData = populatedData;
        this.factName = factName;
        this.factObject = factObject;
        this.resolver = resolver;

        this.pconf = new ParserConfiguration();
        pconf.setClassLoader(resolver.getClassLoader());
        this.pctx = new ParserContext(pconf);
        pctx.setStrongTyping(true);
    }
View Full Code Here

Examples of org.mvel2.ParserConfiguration

        super( factObject,
               fieldName );
        this.typeResolver = typeResolver;
        this.fieldValue = fieldValue;

        this.pconf = new ParserConfiguration();
        pconf.setClassLoader( typeResolver.getClassLoader() ); // classLoader );
        this.pctx = new ParserContext( pconf );
        pctx.setStrongTyping( true );
    }
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.