org.drools.lang.api
Interface DescrBuilder<P extends DescrBuilder<?,?>,T extends BaseDescr>

All Known Subinterfaces:
AccumulateDescrBuilder<P>, AnnotationDescrBuilder<P>, AttributeDescrBuilder<P>, BehaviorDescrBuilder<P>, CEDescrBuilder<P,T>, CollectDescrBuilder<P>, DeclareDescrBuilder, EvalDescrBuilder<P>, FieldDescrBuilder, ForallDescrBuilder<P>, FunctionDescrBuilder, GlobalDescrBuilder, ImportDescrBuilder, PackageDescrBuilder, PatternDescrBuilder<P>, QueryDescrBuilder, RuleDescrBuilder, SourceDescrBuilder<P>
All Known Implementing Classes:
AccumulateDescrBuilderImpl, AnnotationDescrBuilderImpl, AttributeDescrBuilderImpl, BaseDescrBuilderImpl, BehaviorDescrBuilderImpl, CEDescrBuilderImpl, CollectDescrBuilderImpl, DeclareDescrBuilderImpl, EvalDescrBuilderImpl, FieldDescrBuilderImpl, ForallDescrBuilderImpl, FunctionDescrBuilderImpl, GlobalDescrBuilderImpl, ImportDescrBuilderImpl, PackageDescrBuilderImpl, PatternDescrBuilderImpl, QueryDescrBuilderImpl, RuleDescrBuilderImpl, SourceDescrBuilderImpl

public interface DescrBuilder<P extends DescrBuilder<?,?>,T extends BaseDescr>

A super interface for all DescrBuilders.


Method Summary
 P end()
          Returns the parent container of this descr builder.
 DescrBuilder<P,T> endCharacter(int offset)
          Sets the offset of the starting character of the corresponding construction in the source file.
 DescrBuilder<P,T> endLocation(int line, int column)
          Sets the end location of the corresponding construction in the source file.
 T getDescr()
          Returns the descriptor generated by this builder.
 DescrBuilder<P,T> startCharacter(int offset)
          Sets the offset of the starting character of the corresponding construction in the source file.
 DescrBuilder<P,T> startLocation(int line, int column)
          Sets the start location of the corresponding construction in the source file.
 

Method Detail

startLocation

DescrBuilder<P,T> startLocation(int line,
                                int column)
Sets the start location of the corresponding construction in the source file.

Parameters:
line -
column -
Returns:
itself, in order to be used as a fluent API

endLocation

DescrBuilder<P,T> endLocation(int line,
                              int column)
Sets the end location of the corresponding construction in the source file.

Parameters:
line -
column -
Returns:
itself, in order to be used as a fluent API

startCharacter

DescrBuilder<P,T> startCharacter(int offset)
Sets the offset of the starting character of the corresponding construction in the source file.

Parameters:
offset - the offset of the first character of this construction inside the source file, relative to the start.
Returns:
itself, in order to be used as a fluent API

endCharacter

DescrBuilder<P,T> endCharacter(int offset)
Sets the offset of the starting character of the corresponding construction in the source file.

Parameters:
offset - the offset of the first character of this construction inside the source file, relative to the start.
Returns:
itself, in order to be used as a fluent API

getDescr

T getDescr()
Returns the descriptor generated by this builder.

Returns:

end

P end()
Returns the parent container of this descr builder. Example: ruleDescrBuilder.end() will return the PackageDescrBuilder as that is its parent container.

Returns:


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