|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.lang.api.impl.BaseDescrBuilderImpl<PackageDescrBuilder,RuleDescr>
org.drools.lang.api.impl.RuleDescrBuilderImpl
public class RuleDescrBuilderImpl
A descr builder for Rules
Field Summary |
---|
Fields inherited from class org.drools.lang.api.impl.BaseDescrBuilderImpl |
---|
descr, parent |
Constructor Summary | |
---|---|
protected |
RuleDescrBuilderImpl(PackageDescrBuilder parent)
|
Method Summary | |
---|---|
AttributeDescrBuilder<RuleDescrBuilder> |
attribute(String name)
Adds a new attribute to the statement |
RuleDescrBuilder |
attribute(String name,
String value)
Adds a new attribute with the given name and value |
RuleDescrBuilder |
attribute(String name,
String value,
AttributeDescr.Type type)
Adds a new attribute with the given name and value |
RuleDescrBuilder |
extendsRule(String name)
Defines the name of the rule this rule extends. |
CEDescrBuilder<RuleDescrBuilder,AndDescr> |
lhs()
Defines the LHS (condition) of the rule. |
RuleDescrBuilder |
name(String name)
The name of the rule. |
RuleDescrBuilder |
namedRhs(String name,
String rhs)
An additional named right hand side (consequence) of the rule. |
AnnotationDescrBuilder<RuleDescrBuilder> |
newAnnotation(String name)
|
RuleDescrBuilder |
rhs(String rhs)
The default right hand side (consequence) of the rule. |
Methods inherited from class org.drools.lang.api.impl.BaseDescrBuilderImpl |
---|
end, endCharacter, endLocation, getDescr, startCharacter, startLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.drools.lang.api.DescrBuilder |
---|
end, endCharacter, endLocation, getDescr, startCharacter, startLocation |
Constructor Detail |
---|
protected RuleDescrBuilderImpl(PackageDescrBuilder parent)
Method Detail |
---|
public AnnotationDescrBuilder<RuleDescrBuilder> newAnnotation(String name)
newAnnotation
in interface AnnotatedDescrBuilder<RuleDescrBuilder>
public AttributeDescrBuilder<RuleDescrBuilder> attribute(String name)
AttributeSupportBuilder
attribute
in interface AttributeSupportBuilder<RuleDescrBuilder>
name
- the attribute name
public RuleDescrBuilder name(String name)
RuleDescrBuilder
name
in interface RuleDescrBuilder
name
- name of the rule
public RuleDescrBuilder extendsRule(String name)
RuleDescrBuilder
extendsRule
in interface RuleDescrBuilder
name
- name of the parent rule
public RuleDescrBuilder rhs(String rhs)
RuleDescrBuilder
rhs
in interface RuleDescrBuilder
rhs
- the code block
public RuleDescrBuilder namedRhs(String name, String rhs)
RuleDescrBuilder
namedRhs
in interface RuleDescrBuilder
name
- the name of the consequencerhs
- the code block
public CEDescrBuilder<RuleDescrBuilder,AndDescr> lhs()
RuleDescrBuilder
lhs
in interface RuleDescrBuilder
public RuleDescrBuilder attribute(String name, String value)
AttributeSupportBuilder
attribute
in interface AttributeSupportBuilder<RuleDescrBuilder>
name
- the name of the attribute to be addedvalue
- the value of the attribute to be added
public RuleDescrBuilder attribute(String name, String value, AttributeDescr.Type type)
AttributeSupportBuilder
attribute
in interface AttributeSupportBuilder<RuleDescrBuilder>
name
- the name of the attribute to be addedvalue
- the value of the attribute to be addedtype
- the type of the value of the attribute. See AttributeDescr.Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |