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 protectedTypeDeclarationDescrBuilderImpl(PackageDescrBuilder parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDeclarationDescrBuildername(String type)Defines the type nameAnnotationDescrBuilder<TypeDeclarationDescrBuilder>newAnnotation(String name)FieldDescrBuilder<AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>>newField(String name)Adds a field to this type declarationTypeDeclarationDescrBuildersetTrait(boolean trait)TypeDeclarationDescrBuildersuperType(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:TypeDeclarationDescrBuilderDefines the type name- Specified by:
namein interfaceTypeDeclarationDescrBuilder- Parameters:
type- the type name- Returns:
- itself
-
superType
public TypeDeclarationDescrBuilder superType(String type)
Description copied from interface:TypeDeclarationDescrBuilderDefines the super type of this type. For POJOs, this is the super class it will extend- Specified by:
superTypein interfaceTypeDeclarationDescrBuilder- Parameters:
type- the super type for this type- Returns:
- itself
-
setTrait
public TypeDeclarationDescrBuilder setTrait(boolean trait)
- Specified by:
setTraitin interfaceTypeDeclarationDescrBuilder
-
newAnnotation
public AnnotationDescrBuilder<TypeDeclarationDescrBuilder> newAnnotation(String name)
- Specified by:
newAnnotationin interfaceAnnotatedDescrBuilder<TypeDeclarationDescrBuilder>
-
newField
public FieldDescrBuilder<AbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>> newField(String name)
Description copied from interface:AbstractClassTypeDeclarationBuilderAdds a field to this type declaration- Specified by:
newFieldin interfaceAbstractClassTypeDeclarationBuilder<TypeDeclarationDescr>- Parameters:
name- the name of the field- Returns:
- a descriptor builder for the field
-
-