Class TypeDeclarationDescrBuilderImpl
- java.lang.Object
-
- org.drools.compiler.lang.api.impl.BaseDescrBuilderImpl<PackageDescrBuilder,TypeDeclarationDescr>
-
- org.drools.compiler.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.compiler.lang.api.impl.BaseDescrBuilderImpl
descr, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TypeDeclarationDescrBuilderImpl(PackageDescrBuilder parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDeclarationDescrBuilder
name(String type)
Defines the type nameAnnotationDescrBuilder<TypeDeclarationDescrBuilder>
newAnnotation(String name)
FieldDescrBuilder<AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>>
newField(String name)
Adds a field to this type declarationTypeDeclarationDescrBuilder
setTrait(boolean trait)
TypeDeclarationDescrBuilder
superType(String type)
Defines the super type of this type.-
Methods inherited from class org.drools.compiler.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.compiler.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 interfaceTypeDeclarationDescrBuilder
- 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 interfaceTypeDeclarationDescrBuilder
- Parameters:
type
- the super type for this type- Returns:
- itself
-
setTrait
public TypeDeclarationDescrBuilder setTrait(boolean trait)
- Specified by:
setTrait
in interfaceTypeDeclarationDescrBuilder
-
newAnnotation
public AnnotationDescrBuilder<TypeDeclarationDescrBuilder> newAnnotation(String name)
- Specified by:
newAnnotation
in interfaceAnnotatedDescrBuilder<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 interfaceAbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>
- Parameters:
name
- the name of the field- Returns:
- a descriptor builder for the field
-
-