Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PackageDescrBuilder
end()
Returns itself, as there is no container for a package descr builder.PackageDescrBuilder
name(String name)
Sets the name of the packageAccumulateImportDescrBuilder
newAccumulateImport()
Adds an accumulate import statement to the packageDeclareDescrBuilder
newDeclare()
Adds a new Declare statement to the packageFunctionDescrBuilder
newFunction()
Adds a new Function statement to the packageImportDescrBuilder
newFunctionImport()
Adds a function import statement to the packageGlobalDescrBuilder
newGlobal()
Adds a global statement to the packageImportDescrBuilder
newImport()
Adds an import statement to the packageQueryDescrBuilder
newQuery()
Adds a new Query to the packageRuleDescrBuilder
newRule()
Adds a new Rule to the packageUnitDescrBuilder
newUnit()
Adds a unit statement 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
-
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:
end
in interfaceDescrBuilder<PackageDescrBuilder,PackageDescr>
- Returns:
-
-