Class JavaPackageDeclarationBuilder<PackageDeclaration extends JavaPackageDeclaration>
java.lang.Object
com.github.tadukoo.java.packagedeclaration.JavaPackageDeclarationBuilder<PackageDeclaration>
- Type Parameters:
PackageDeclaration- The type ofJavaPackageDeclarationthat will be returned by the builder
- Direct Known Subclasses:
EditableJavaPackageDeclaration.EditableJavaPackageDeclarationBuilder,UneditableJavaPackageDeclaration.UneditableJavaPackageDeclarationBuilder
public abstract class JavaPackageDeclarationBuilder<PackageDeclaration extends JavaPackageDeclaration>
extends Object
A builder used to build a new
JavaPackageDeclaration. It takes the following parameters:
| Parameter Name | Description | Default or Required |
|---|---|---|
| packageName | The name of the package in the declaration | Required |
- Version:
- Beta v.0.5
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNot allowed to instantiate outside of subclasses -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newpackage declarationusing the set parameters, after checking for errorsprotected abstract PackageDeclarationcopy(JavaPackageDeclaration packageDeclaration) Copies the settings from the givenpackage declarationto this builderpackageName(String packageName)
-
Field Details
-
packageName
The name of the package in the declaration
-
-
Constructor Details
-
JavaPackageDeclarationBuilder
protected JavaPackageDeclarationBuilder()Not allowed to instantiate outside of subclasses
-
-
Method Details
-
copy
public JavaPackageDeclarationBuilder<PackageDeclaration> copy(JavaPackageDeclaration packageDeclaration) Copies the settings from the givenpackage declarationto this builder- Parameters:
packageDeclaration- Thepackage declarationto copy settings from- Returns:
- this, to continue building
-
packageName
- Parameters:
packageName- The name of the package in the declaration- Returns:
- this, to continue building
-
build
Builds a newpackage declarationusing the set parameters, after checking for errors- Returns:
- The newly built
package declaration
-
constructPackageDeclaration
- Returns:
- A newly constructed
package declaration
-