org.drools.lang.api.impl
Class RuleDescrBuilderImpl

java.lang.Object
  extended by org.drools.lang.api.impl.BaseDescrBuilderImpl<PackageDescrBuilder,RuleDescr>
      extended by org.drools.lang.api.impl.RuleDescrBuilderImpl
All Implemented Interfaces:
AnnotatedDescrBuilder<RuleDescrBuilder>, AttributeSupportBuilder<RuleDescrBuilder>, DescrBuilder<PackageDescrBuilder,RuleDescr>, RuleDescrBuilder

public class RuleDescrBuilderImpl
extends BaseDescrBuilderImpl<PackageDescrBuilder,RuleDescr>
implements RuleDescrBuilder

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)
           
 CEDescrBuilder<RuleDescrBuilder,AndDescr> lhs()
           
 RuleDescrBuilder name(String name)
           
 AnnotationDescrBuilder<RuleDescrBuilder> newAnnotation(String name)
           
 RuleDescrBuilder rhs(String rhs)
           
 
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

RuleDescrBuilderImpl

protected RuleDescrBuilderImpl(PackageDescrBuilder parent)
Method Detail

newAnnotation

public AnnotationDescrBuilder<RuleDescrBuilder> newAnnotation(String name)
Specified by:
newAnnotation in interface AnnotatedDescrBuilder<RuleDescrBuilder>

attribute

public AttributeDescrBuilder<RuleDescrBuilder> attribute(String name)
Description copied from interface: AttributeSupportBuilder
Adds a new attribute to the statement

Specified by:
attribute in interface AttributeSupportBuilder<RuleDescrBuilder>
Parameters:
name - the attribute name
Returns:
the AttributeDescrBuilder to set the attribute value

name

public RuleDescrBuilder name(String name)
Specified by:
name in interface RuleDescrBuilder

extendsRule

public RuleDescrBuilder extendsRule(String name)
Specified by:
extendsRule in interface RuleDescrBuilder

rhs

public RuleDescrBuilder rhs(String rhs)
Specified by:
rhs in interface RuleDescrBuilder

lhs

public CEDescrBuilder<RuleDescrBuilder,AndDescr> lhs()
Specified by:
lhs in interface RuleDescrBuilder

attribute

public RuleDescrBuilder attribute(String name,
                                  String value)
Description copied from interface: AttributeSupportBuilder
Adds a new attribute with the given name and value

Specified by:
attribute in interface AttributeSupportBuilder<RuleDescrBuilder>
Parameters:
name - the name of the attribute to be added
value - the value of the attribute to be added
Returns:
the container builder

attribute

public RuleDescrBuilder attribute(String name,
                                  String value,
                                  AttributeDescr.Type type)
Description copied from interface: AttributeSupportBuilder
Adds a new attribute with the given name and value

Specified by:
attribute in interface AttributeSupportBuilder<RuleDescrBuilder>
Parameters:
name - the name of the attribute to be added
value - the value of the attribute to be added
type - the type of the value of the attribute. See AttributeDescr.Type
Returns:
the container builder


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