Package org.drools.base

Examples of org.drools.base.ClassFieldAccessorCache$CacheEntry


    private PackageRegistry newPackage(final PackageDescr packageDescr) {
        Package pkg;
        if ( this.ruleBase == null || (pkg = this.ruleBase.getPackage( packageDescr.getName() )) == null ) {
            // there is no rulebase or it does not define this package so define it
            pkg = new Package( packageDescr.getName() );
            pkg.setClassFieldAccessorCache( new ClassFieldAccessorCache( this.rootClassLoader ) );

            // if there is a rulebase then add the package.
            if ( this.ruleBase != null ) {
                // Must lock here, otherwise the assumption about addPackage/getPackage behavior below might be violated
                this.ruleBase.lock();
View Full Code Here


        this.statefulSessions = new ObjectHashSet();

        this.classTypeDeclaration = new HashMap<String, TypeDeclaration>();
        this.partitionIDs = new CopyOnWriteArrayList<RuleBasePartitionId>();

        this.classFieldAccessorCache = new ClassFieldAccessorCache( this.rootClassLoader );

        this.getConfiguration().getComponentFactory().getTraitFactory().setRuleBase( this );
    }
View Full Code Here

                        typeStore,
                        this.rootClassLoader
        );
        this.rootClassLoader.addClassLoader( this.declarationClassLoader );

        this.classFieldAccessorCache = new ClassFieldAccessorCache( this.rootClassLoader );

        this.config = (RuleBaseConfiguration) droolsStream.readObject();
        this.config.setClassLoader( droolsStream.getParentClassLoader() );

        this.pkgs = (Map<String, Package>) droolsStream.readObject();
View Full Code Here

    private PackageRegistry newPackage( final PackageDescr packageDescr ) {
        Package pkg;
        if (this.ruleBase == null || ( pkg = this.ruleBase.getPackage( packageDescr.getName() ) ) == null) {
            // there is no rulebase or it does not define this package so define it
            pkg = new Package( packageDescr.getName() );
            pkg.setClassFieldAccessorCache( new ClassFieldAccessorCache( this.rootClassLoader ) );

            // if there is a rulebase then add the package.
            if (this.ruleBase != null) {
                // Must lock here, otherwise the assumption about addPackage/getPackage behavior below might be violated
                this.ruleBase.lock();
View Full Code Here

        this.statefulSessions = new ObjectHashSet();

        this.classTypeDeclaration = new HashMap<String, TypeDeclaration>();
        this.partitionIDs = new CopyOnWriteArrayList<RuleBasePartitionId>();

        this.classFieldAccessorCache = new ClassFieldAccessorCache( this.rootClassLoader );

        this.getConfiguration().getComponentFactory().getTraitFactory().setRuleBase( this );
        this.getConfiguration().getComponentFactory().getTripleStore().setId( id );

    }
View Full Code Here

                        typeStore,
                        this.rootClassLoader
        );
        this.rootClassLoader.addClassLoader( this.declarationClassLoader );

        this.classFieldAccessorCache = new ClassFieldAccessorCache( this.rootClassLoader );

        this.config = (RuleBaseConfiguration) droolsStream.readObject();
        this.config.setClassLoader( droolsStream.getParentClassLoader() );

        this.pkgs = (Map<String, Package>) droolsStream.readObject();
View Full Code Here

            registry.onBeforeExecute();
            // then re-resolve type definitions
            for( TypeDeclaration type : pkg.getTypeDeclarations().values() ) {
                try {
                    type.setTypeClass( this.rootClassLoader.loadClass( type.getTypeClassName() ) );
                    pkg.setClassFieldAccessorCache( new ClassFieldAccessorCache( this.rootClassLoader ) );
                    for( FieldDefinition fd : type.getTypeClassDef().getFieldsDefinitions() ) {
                        fd.setReadWriteAccessor( pkg.getClassFieldAccessorStore().getAccessor( type.getTypeClassName(), fd.getName() ) );
                    }
                   
                    // also re-wire OTNs for that type
View Full Code Here

    private final Address[] business = new Address[2];
    private final Address[] home     = new Address[2];

    @Before
    public void setUp() throws Exception {
        store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
        store.setEagerWire( true );

        extractor = ( MVELObjectClassFieldReader ) store.getMVELReaderPerson.class.getPackage().getName(),
                                                                         Person.class.getName(),
                                                                         "addresses['home'].street",
View Full Code Here

    private ReteooRuleBase       ruleBase;
    private BuildContext         buildContext;

    @Before
    public void setUp() throws Exception {
        store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
        store.setEagerWire( true );

        ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
        buildContext = new BuildContext( ruleBase,
                                         new ReteooBuilder.IdGenerator() );
View Full Code Here

    ClassFieldAccessorStore      store  = new ClassFieldAccessorStore();

    @Before
    public void setUp() throws Exception {
        store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
        store.setEagerWire( true );
    }
View Full Code Here

TOP

Related Classes of org.drools.base.ClassFieldAccessorCache$CacheEntry

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.