private void visitFromAccumulateCompositeFactPattern( FromAccumulateCompositeFactPattern pattern ) { visit( pattern.getFactPattern() ); visit( pattern.getSourcePattern() ); parseStringPattern( pattern.getActionCode() ); parseStringPattern( pattern.getInitCode() ); parseStringPattern( pattern.getReverseCode() ); }
public void visit( ExpressionMethod part ) { ExpressionMethod method = new ExpressionMethod( part.getName(), part.getClassType(), part.getGenericType(), part.getParametricType() ); copyMethodParams( part, method ); add( method ); moveNext( part ); }
private void visitFactPattern( FactPattern pattern ) { this.factPattern = pattern; for ( FieldConstraint fc : pattern.getFieldConstraints() ) { visit( fc ); } }
private void visitActionFieldList( ActionUpdateField afl ) { String factType = model.getLHSBindingType( afl.getVariable() ); for ( ActionFieldValue afv : afl.getFieldValues() ) { InterpolationVariable var = new InterpolationVariable( afv.getValue(), afv.getType(), factType, afv.getField() ); if ( afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey( var ) ) { vars.put( var, vars.size() ); } } }
private void visitFromCompositeFactPattern( FromCompositeFactPattern pattern ) { visit( pattern.getFactPattern() ); parseStringPattern( pattern.getExpression().getText() ); }
private void addNewFact( String itemText, int position ) { this.model.addLhsItem( new FactPattern( itemText ), position ); }
public void visit( ExpressionCollectionIndex part ) { ExpressionCollectionIndex method = new ExpressionCollectionIndex( part.getName(), part.getClassType(), part.getGenericType(), part.getParametricType() ); copyMethodParams( part, method ); add( method ); moveNext( part ); }
private void addRetract( String var, int position ) { this.model.addRhsItem( new ActionRetractFact( var ), position ); }
private void addNewCE( String s, int position ) { this.model.addLhsItem( new CompositeFactPattern( s ), position ); }
private void addModify( String itemText, int position ) { this.model.addRhsItem( new ActionUpdateField( itemText ), position ); }
private void addActionSetField( String itemText, int position ) { this.model.addRhsItem( new ActionSetField( itemText ), position ); }
public void visit( ExpressionGlobalVariable part ) { add( new ExpressionGlobalVariable( part.getName(), part.getClassType(), part.getGenericType(), part.getParametricType() ) ); moveNext( part ); }
private void addCallMethod( String itemText, int position ) { this.model.addRhsItem( new ActionCallMethod( itemText ), position ); }
private void visitCompositeFieldConstraint( CompositeFieldConstraint cfc ) { if ( cfc.getConstraints() != null ) { for ( FieldConstraint fc : cfc.getConstraints() ) { visit( fc ); } } }
@Override public String getFieldName() { return getExpressionLeftSide().getFieldName(); }
public void visit( ExpressionVariable part ) { add( new ExpressionVariable( part.getFact() ) ); moveNext( part ); }
private void visitCompositeFactPattern( CompositeFactPattern pattern ) { if ( pattern.getPatterns() != null ) { for ( IFactPattern fp : pattern.getPatterns() ) { visit( fp ); } } }
private void addNewDSLLhs( final DSLSentence sentence, int position ) { model.addLhsItem( sentence.copy(), position ); }
private void addNewDSLRhs( DSLSentence sentence, int position ) { this.model.addRhsItem( sentence.copy(), position ); }
public String getPreviousClassType() { ExpressionPart last = getPreviousPart(); return last.getPrevious() == null ? null : last.getPrevious().getClassType(); }