Java Doc for PackageBuilder.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » compiler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » drolls Rule Engine » org.drools.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.drools.compiler.PackageBuilder

All known Subclasses:   org.drools.brms.server.builder.BRMSPackageBuilder,
PackageBuilder
public class PackageBuilder (Code)
This is the main compiler class for parsing and compiling rules and assembling or merging them into a binary Package instance. This can be done by merging into existing binary packages, or totally from source. If you are using the Java dialect the JavaDialectConfiguration will attempt to validate that the specified compiler is in the classpath, using ClassLoader.loasClass(String). If you intented to just Janino sa the compiler you must either overload the compiler property before instantiating this class or the PackageBuilder, or make sure Eclipse is in the classpath, as Eclipse is the default.

Inner Class :public static class MissingPackageNameException extends IllegalArgumentException
Inner Class :public static class PackageMergeException extends IllegalArgumentException
Inner Class :abstract public static class ErrorHandler
Inner Class :public static class RuleErrorHandler extends ErrorHandler
Inner Class :public static class RuleInvokerErrorHandler extends RuleErrorHandler
Inner Class :public static class FunctionErrorHandler extends ErrorHandler


Constructor Summary
public  PackageBuilder()
     Use this when package is starting from scratch.
public  PackageBuilder(Package pkg)
     This will allow you to merge rules into this pre existing package.
public  PackageBuilder(PackageBuilderConfiguration configuration)
    
public  PackageBuilder(Package pkg, PackageBuilderConfiguration configuration)
     This allows you to pass in a pre existing package, and a configuration (for instance to set the classloader).

Method Summary
public  voidaddPackage(PackageDescr packageDescr)
     This adds a package from a Descr/AST This will also trigger a compile, if there are any generated classes to compile of course.
public  voidaddPackageFromDrl(Reader reader)
     Load a rule package from DRL source.
public  voidaddPackageFromDrl(Reader source, Reader dsl)
     Load a rule package from DRL source using the supplied DSL configuration.
public  voidaddPackageFromXml(Reader reader)
     Load a rule package from XML source.
public  voidaddRuleFlow(Reader processSource)
     Add a ruleflow (.rt) asset to this package.
public  ClassFieldExtractorCachegetClassFieldExtractorCache()
    
public  PackageBuilderErrorsgetErrors()
    
public  PackagegetPackage()
     The compiled package.
public  PackageBuilderConfigurationgetPackageBuilderConfiguration()
    
public  TypeResolvergetTypeResolver()
     a Type resolver, lazily.
public  booleanhasErrors()
    
protected  voidresetErrors()
     Reset the error list.


Constructor Detail
PackageBuilder
public PackageBuilder()(Code)
Use this when package is starting from scratch.



PackageBuilder
public PackageBuilder(Package pkg)(Code)
This will allow you to merge rules into this pre existing package.



PackageBuilder
public PackageBuilder(PackageBuilderConfiguration configuration)(Code)
Pass a specific configuration for the PackageBuilder
Parameters:
  configuration -



PackageBuilder
public PackageBuilder(Package pkg, PackageBuilderConfiguration configuration)(Code)
This allows you to pass in a pre existing package, and a configuration (for instance to set the classloader).
Parameters:
  pkg - A pre existing package (can be null if none exists)
Parameters:
  configuration - Optional configuration for this builder.




Method Detail
addPackage
public void addPackage(PackageDescr packageDescr)(Code)
This adds a package from a Descr/AST This will also trigger a compile, if there are any generated classes to compile of course.



addPackageFromDrl
public void addPackageFromDrl(Reader reader) throws DroolsParserException, IOException(Code)
Load a rule package from DRL source.
Parameters:
  reader -
throws:
  DroolsParserException -
throws:
  IOException -



addPackageFromDrl
public void addPackageFromDrl(Reader source, Reader dsl) throws DroolsParserException, IOException(Code)
Load a rule package from DRL source using the supplied DSL configuration.
Parameters:
  source - The source of the rules.
Parameters:
  dsl - The source of the domain specific language configuration.
throws:
  DroolsParserException -
throws:
  IOException -



addPackageFromXml
public void addPackageFromXml(Reader reader) throws DroolsParserException, IOException(Code)
Load a rule package from XML source.
Parameters:
  reader -
throws:
  DroolsParserException -
throws:
  IOException -



addRuleFlow
public void addRuleFlow(Reader processSource)(Code)
Add a ruleflow (.rt) asset to this package.



getClassFieldExtractorCache
public ClassFieldExtractorCache getClassFieldExtractorCache()(Code)
Return the ClassFieldExtractorCache, this should only be used internally, and is subject to change the ClsasFieldExtractorCache



getErrors
public PackageBuilderErrors getErrors()(Code)
A list of Error objects that resulted from building and compilingthe package.



getPackage
public Package getPackage()(Code)
The compiled package. The package may contain errors, which youcan report on by calling getErrors or printErrors. If you try toadd an invalid package (or rule) to a RuleBase, you will get aruntime exception.Compiled packages are serializable.



getPackageBuilderConfiguration
public PackageBuilderConfiguration getPackageBuilderConfiguration()(Code)
Return the PackageBuilderConfiguration for this PackageBuilder session The PackageBuilderConfiguration



getTypeResolver
public TypeResolver getTypeResolver()(Code)
a Type resolver, lazily. If one does not exist yet, it will beinitialised.



hasErrors
public boolean hasErrors()(Code)
This will return true if there were errors in the package building and compiling phase



resetErrors
protected void resetErrors()(Code)
Reset the error list. This is useful when incrementally building packages. Care should be used when building this, if you clear this when there were errors on items that a rule depends on (eg functions), then you will get spurious errors which will not be that helpful.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.