Drools :: Compiler 6.0.0.CR5

org.drools.compiler.lang.api
Interface PackageDescrBuilder

All Superinterfaces:
AttributeSupportBuilder<PackageDescrBuilder>, DescrBuilder<PackageDescrBuilder,PackageDescr>
All Known Implementing Classes:
PackageDescrBuilderImpl

public interface PackageDescrBuilder
extends AttributeSupportBuilder<PackageDescrBuilder>, DescrBuilder<PackageDescrBuilder,PackageDescr>


Method Summary
 PackageDescrBuilder end()
          Returns itself, as there is no container for a package descr builder.
 PackageDescrBuilder name(String name)
          Sets the name of the package
 DeclareDescrBuilder newDeclare()
          Adds a new Declare statement to the package
 FunctionDescrBuilder newFunction()
          Adds a new Function statement to the package
 ImportDescrBuilder newFunctionImport()
          Adds a function import statement to the package
 GlobalDescrBuilder newGlobal()
          Adds a global statement to the package
 ImportDescrBuilder newImport()
          Adds an import statement to the package
 QueryDescrBuilder newQuery()
          Adds a new Query to the package
 RuleDescrBuilder newRule()
          Adds a new Rule to the package
 
Methods inherited from interface org.drools.compiler.lang.api.AttributeSupportBuilder
attribute, attribute, attribute
 
Methods inherited from interface org.drools.compiler.lang.api.DescrBuilder
endCharacter, endLocation, getDescr, startCharacter, startLocation
 

Method Detail

name

PackageDescrBuilder name(String name)
Sets the name of the package

Parameters:
name -
Returns:
itself, in order to be used as a fluent API

newImport

ImportDescrBuilder newImport()
Adds an import statement to the package

Returns:
the ImporDescrBuilder to set the import

newFunctionImport

ImportDescrBuilder newFunctionImport()
Adds a function import statement to the package

Returns:
the ImporDescrBuilder to set the function import

newGlobal

GlobalDescrBuilder newGlobal()
Adds a global statement to the package

Returns:
the GlobalDescrBuilder to set the global

newDeclare

DeclareDescrBuilder newDeclare()
Adds a new Declare statement to the package

Returns:
the DeclareDescrBuilder to build the declare statement

newFunction

FunctionDescrBuilder newFunction()
Adds a new Function statement to the package

Returns:
the FunctionDescrBuilder to build the function statement

newRule

RuleDescrBuilder newRule()
Adds a new Rule to the package

Returns:
the RuleDescrBuilder to build the rule

newQuery

QueryDescrBuilder newQuery()
Adds a new Query to the package

Returns:
the QueryDescrBuilder to build the query

end

PackageDescrBuilder end()
Returns itself, as there is no container for a package descr builder. Returns the parent container of this descr builder. Example: ruleDescrBuilder.end() will return the PackageDescrBuilder as that is its parent container.

Specified by:
end in interface DescrBuilder<PackageDescrBuilder,PackageDescr>
Returns:

Drools :: Compiler 6.0.0.CR5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.