Class JavaImportStatementBuilder<ImportStatementType extends JavaImportStatement>
java.lang.Object
com.github.tadukoo.java.importstatement.JavaImportStatementBuilder<ImportStatementType>
- Type Parameters:
ImportStatementType- The type ofJavaImportStatementbeing built
- Direct Known Subclasses:
EditableJavaImportStatement.EditableJavaImportStatementBuilder,UneditableJavaImportStatement.UneditableJavaImportStatementBuilder
public abstract class JavaImportStatementBuilder<ImportStatementType extends JavaImportStatement>
extends Object
A builder used to build a
JavaImportStatement. It takes the following parameters:
| Parameter Name | Description | Default or Required |
|---|---|---|
| isStatic | Whether the import statement is static or not | false |
| importName | The name used in the import | Required |
- Version:
- Beta v.0.5
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe name used in the importprotected booleanWhether the import statement is static or not -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNot allowed to instantiate outside subclasses -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newJavaImportStatementusing the set parameters, after checking for any errorsprotected abstract ImportStatementTypecopy(JavaImportStatement importStatement) Copies the settings from the givenimport statementinto this builderimportName(String importName) isStatic()Sets the import statement to be staticisStatic(boolean isStatic)
-
Field Details
-
isStatic
protected boolean isStaticWhether the import statement is static or not -
importName
The name used in the import
-
-
Constructor Details
-
JavaImportStatementBuilder
protected JavaImportStatementBuilder()Not allowed to instantiate outside subclasses
-
-
Method Details
-
copy
Copies the settings from the givenimport statementinto this builder- Parameters:
importStatement- Theimport statementto copy settings from- Returns:
- this, to continue building
-
isStatic
Sets the import statement to be static- Returns:
- this, to continue building
-
isStatic
- Parameters:
isStatic- Whether the import statement is static or not- Returns:
- this, to continue building
-
importName
- Parameters:
importName- The name used in the import- Returns:
- this, to continue building
-
build
Builds a newJavaImportStatementusing the set parameters, after checking for any errors- Returns:
- The newly built
JavaImportStatement
-
constructImportStatement
- Returns:
- A newly constructed
JavaImportStatementusing the set parameters
-