Examples of addDeclaration()


Examples of org.drools.rule.Pattern.addDeclaration()

                    declrIndexes.add( i );
                    arguments.add( declr );
                    requiredDeclarations.add( declr );
                } else {
                    // unification variable                   
                    declr = pattern.addDeclaration( var );

                    // this bit is different, notice its the ArrayElementReader that we wire up to, not the declaration.
                    ArrayElementReader reader = new ArrayElementReader( arrayReader,
                                                                        varIndexes.size(),
                                                                        params[i].getExtractor().getExtractToClass() );
View Full Code Here

Examples of org.drools.rule.Pattern.addDeclaration()

                new ClassObjectType( Person.class ),
                "$persone" );



        Declaration declr = p.addDeclaration( "age" );

        final InternalReadAccessor extractor = PatternBuilder.getFieldReadAccessor( context,
                new BindingDescr("age", "age"),
                p.getObjectType(),
                "age",
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

                // System.err.println("fire");
            }
        } );
        // add condition
        InstrumentedCondition c1 = new InstrumentedCondition( );
        c1.addDeclaration( stringDecl1 );
        c1.isAllowed( true );
        InstrumentedCondition c2 = new InstrumentedCondition( );
        c2.addDeclaration( stringDecl2 );
        c2.isAllowed( true );
        InstrumentedCondition c3 = new InstrumentedCondition( );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

        // add condition
        InstrumentedCondition c1 = new InstrumentedCondition( );
        c1.addDeclaration( stringDecl1 );
        c1.isAllowed( true );
        InstrumentedCondition c2 = new InstrumentedCondition( );
        c2.addDeclaration( stringDecl2 );
        c2.isAllowed( true );
        InstrumentedCondition c3 = new InstrumentedCondition( );
        c3.addDeclaration( intDecl );
        c3.isAllowed( true );
        rule.addCondition( c1 );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

        c1.isAllowed( true );
        InstrumentedCondition c2 = new InstrumentedCondition( );
        c2.addDeclaration( stringDecl2 );
        c2.isAllowed( true );
        InstrumentedCondition c3 = new InstrumentedCondition( );
        c3.addDeclaration( intDecl );
        c3.isAllowed( true );
        rule.addCondition( c1 );
        rule.addCondition( c2 );
        rule.addCondition( c3 );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

    {
        Set decls = new HashSet( );

        InstrumentedCondition cond = new InstrumentedCondition( );

        cond.addDeclaration( this.stringDecl );
        cond.addDeclaration( this.objectDecl );

        assertTrue( !this.builder.matches( cond, decls ) );

        decls.add( this.stringDecl );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

        Set decls = new HashSet( );

        InstrumentedCondition cond = new InstrumentedCondition( );

        cond.addDeclaration( this.stringDecl );
        cond.addDeclaration( this.objectDecl );

        assertTrue( !this.builder.matches( cond, decls ) );

        decls.add( this.stringDecl );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

        sources.add( source );

        InstrumentedCondition cond = new InstrumentedCondition( );

        cond.addDeclaration( this.stringDecl );

        TupleSource found;

        found = this.builder.findMatchingTupleSourceForCondition( cond, sources );
View Full Code Here

Examples of org.drools.spi.InstrumentedCondition.addDeclaration()

        assertNull( found );

        // ----------------------------------------
        // ----------------------------------------

        cond.addDeclaration( this.objectDecl );

        sources.clear( );

        source = new MockTupleSource( );
View Full Code Here

Examples of org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.addDeclaration()

    if (typeDeclarationInfo.getTypeDeclaration().getSuperclassType() != null) {
      final TypeInfo typeInfo = new TypeInfo(typeDeclarationInfo.getTypeDeclaration().getSuperclassType(), this);
      compositeTypeSpecifier.addBaseSpecifier(f.newBaseSpecifier(typeInfo.getName(), 0, false));
    }

    compositeTypeSpecifier.addDeclaration(f.newVisibilityLabel(ICPPASTVisibilityLabel.v_private));
    for (final TypeDeclarationInfo subType : typeDeclarationInfo.subTypes()) {
      if (subType.getModifiers().isPrivate) {
        compositeTypeSpecifier.addDeclaration(buildTypeDeclaration(subType));
      }
    }
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.