Package org.drools.lang.descr

Examples of org.drools.lang.descr.FunctionDescr.addParameter()


    packageDescr.addImport(new ImportDescr("java.util.TreeSet"));
  }
 
  private static void addFunctions(PackageDescr packageDescr) {
    FunctionDescr functionDescr = new FunctionDescr("foo", "void");
    functionDescr.addParameter("String", "arg1");
    String body =
      "Set myHashSet = new HashSet();" +
      "myHashSet.add(arg1);" +
      "List myArrayList = new ArrayList();" +
      "myArrayList.add(arg1);" +
View Full Code Here


            }
           
            if ( param.charAt( param.length()-1 ) == '"' ) {
                param = param.substring( 0, param.length()-1 );
            }
            descr.addParameter"Object",  param );
        }
       
        descr.setBody( content.toString() );
       
        return descr;
View Full Code Here

            final String type = ((Element)parameters.item( i )).getAttribute( "type" );
           
            emptyAttributeCheck("parameter", "identifier", identifier, parser);                 
            emptyAttributeCheck("parameter", "type", type, parser);
           
            functionDescr.addParameter( type,
                                        identifier );
        }

        // we allow empty, "", bodies - but make sure that we atleast have a body element
             
View Full Code Here

            }
           
            if ( param.charAt( param.length()-1 ) == '"' ) {
                param = param.substring( 0, param.length()-1 );
            }
            descr.addParameter"Object",  param );
        }
       
        descr.setContent( content );
       
        return descr;
View Full Code Here

            final String type = ((Element)parameters.item( i )).getAttribute( "type" );
           
            emptyAttributeCheck("parameter", "identifier", identifier, parser);                 
            emptyAttributeCheck("parameter", "type", type, parser);
           
            functionDescr.addParameter( type,
                                        identifier );
        }

        // we allow empty, "", bodies - but make sure that we atleast have a body element
             
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.