org.drools.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.lang.api.AttributeSupportBuilder
attribute, attribute, attribute
 
Methods inherited from interface org.drools.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:


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.