Package org.drools.drl.ast.dsl
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
Modifier and TypeMethodDescriptionend()Returns itself, as there is no container for a package descr builder.Sets the name of the packageAdds an accumulate import statement to the packageAdds a new Declare statement to the packageAdds a new Function statement to the packageAdds a function import statement to the packageAdds a global statement to the packageAdds an import statement to the packagenewQuery()Adds a new Query to the packagenewRule()Adds a new Rule to the packagenewUnit()Adds a unit statement to the packageMethods inherited from interface org.drools.drl.ast.dsl.AttributeSupportBuilder
attribute, attribute, attributeMethods inherited from interface org.drools.drl.ast.dsl.DescrBuilder
endCharacter, endLocation, getDescr, getParent, startCharacter, startLocation
-
Method Details
-
name
Sets the name of the package- Parameters:
name-- Returns:
- itself, in order to be used as a fluent API
-
newUnit
UnitDescrBuilder newUnit()Adds a unit statement to the package- Returns:
- the UnitDescrBuilder to define the unit
-
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
-
newAccumulateImport
AccumulateImportDescrBuilder newAccumulateImport()Adds an accumulate import statement to the package- Returns:
-
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:
endin interfaceDescrBuilder<PackageDescrBuilder,PackageDescr> - Returns:
-