org.drools.lang.api.impl
Class TypeDeclarationDescrBuilderImpl

java.lang.Object
  extended by org.drools.lang.api.impl.BaseDescrBuilderImpl<PackageDescrBuilder,TypeDeclarationDescr>
      extended by org.drools.lang.api.impl.TypeDeclarationDescrBuilderImpl
All Implemented Interfaces:
AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>, AnnotatedDescrBuilder<TypeDeclarationDescrBuilder>, DescrBuilder<PackageDescrBuilder,TypeDeclarationDescr>, TypeDeclarationDescrBuilder

public class TypeDeclarationDescrBuilderImpl
extends BaseDescrBuilderImpl<PackageDescrBuilder,TypeDeclarationDescr>
implements TypeDeclarationDescrBuilder


Field Summary
 
Fields inherited from class org.drools.lang.api.impl.BaseDescrBuilderImpl
descr, parent
 
Constructor Summary
protected TypeDeclarationDescrBuilderImpl(PackageDescrBuilder parent)
           
 
Method Summary
 TypeDeclarationDescrBuilder name(String type)
          Defines the type name
 AnnotationDescrBuilder<TypeDeclarationDescrBuilder> newAnnotation(String name)
           
 FieldDescrBuilder<AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>> newField(String name)
          Adds a field to this type declaration
 TypeDeclarationDescrBuilder superType(String type)
          Defines the super type of this type.
 
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

TypeDeclarationDescrBuilderImpl

protected TypeDeclarationDescrBuilderImpl(PackageDescrBuilder parent)
Method Detail

name

public TypeDeclarationDescrBuilder name(String type)
Description copied from interface: TypeDeclarationDescrBuilder
Defines the type name

Specified by:
name in interface TypeDeclarationDescrBuilder
Parameters:
type - the type name
Returns:
itself

superType

public TypeDeclarationDescrBuilder superType(String type)
Description copied from interface: TypeDeclarationDescrBuilder
Defines the super type of this type. For POJOs, this is the super class it will extend

Specified by:
superType in interface TypeDeclarationDescrBuilder
Parameters:
type - the super type for this type
Returns:
itself

newAnnotation

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

newField

public FieldDescrBuilder<AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>> newField(String name)
Description copied from interface: AbstractClassTypeDeclarationBuilder
Adds a field to this type declaration

Specified by:
newField in interface AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>
Parameters:
name - the name of the field
Returns:
a descriptor builder for the field


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.