Package org.drools.drl.ast.dsl.impl
Class TypeDeclarationDescrBuilderImpl
java.lang.Object
org.drools.drl.ast.dsl.impl.BaseDescrBuilderImpl<PackageDescrBuilder,TypeDeclarationDescr>
org.drools.drl.ast.dsl.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.drl.ast.dsl.impl.BaseDescrBuilderImpl
descr, parent -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionDefines the type namenewAnnotation(String name) Adds a field to this type declarationsetTrait(boolean trait) Defines the super type of this type.Methods inherited from class org.drools.drl.ast.dsl.impl.BaseDescrBuilderImpl
end, endCharacter, endLocation, getDescr, getParent, startCharacter, startLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.drl.ast.dsl.DescrBuilder
end, endCharacter, endLocation, getDescr, getParent, startCharacter, startLocation
-
Constructor Details
-
TypeDeclarationDescrBuilderImpl
-
-
Method Details
-
name
Description copied from interface:TypeDeclarationDescrBuilderDefines the type name- Specified by:
namein interfaceTypeDeclarationDescrBuilder- Parameters:
type- the type name- Returns:
- itself
-
superType
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
- Specified by:
setTraitin interfaceTypeDeclarationDescrBuilder
-
newAnnotation
- 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
-