Class JavaPackageDeclaration
java.lang.Object
com.github.tadukoo.java.packagedeclaration.JavaPackageDeclaration
- All Implemented Interfaces:
JavaCodeType,JavaTokens
- Direct Known Subclasses:
EditableJavaPackageDeclaration,UneditableJavaPackageDeclaration
Represents a package declaration in Java
- Version:
- Beta v.0.5
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
FieldsFields inherited from interface com.github.tadukoo.java.JavaCodeType
NEWLINE_WITH_2_TABS, NEWLINE_WITH_4_TABSFields inherited from interface com.github.tadukoo.java.JavaTokens
ABSTRACT_MODIFIER, ANNOTATION_START_TOKEN, ASSIGNMENT_OPERATOR_TOKEN, BLOCK_CLOSE_TOKEN, BLOCK_OPEN_TOKEN, CLASS_TOKEN, EXTENDS_TOKEN, FINAL_MODIFIER, IMPLEMENTS_TOKEN, IMPORT_TOKEN, JAVADOC_AUTHOR_TOKEN, JAVADOC_LINE_TOKEN, JAVADOC_PARAM_TOKEN, JAVADOC_RETURN_TOKEN, JAVADOC_SINCE_TOKEN, JAVADOC_START_TOKEN, JAVADOC_VERSION_TOKEN, LIST_SEPARATOR_TOKEN, MODIFIERS, MULTI_LINE_COMMENT_CLOSE_TOKEN, MULTI_LINE_COMMENT_START_TOKEN, PACKAGE_TOKEN, PARAMETER_CLOSE_TOKEN, PARAMETER_OPEN_TOKEN, PRIVATE_MODIFIER, PROTECTED_MODIFIER, PUBLIC_MODIFIER, SEMICOLON, SINGLE_LINE_COMMENT_TOKEN, STATIC_MODIFIER, THROWS_TOKEN, VISIBILITY_MODIFIERS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaPackageDeclaration(boolean editable, String packageName) Constructs a newpackage declarationusing the given parameters -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.tadukoo.java.JavaCodeType
escapeQuotes
-
Field Details
-
packageName
The name of the package in this declaration
-
-
Constructor Details
-
JavaPackageDeclaration
Constructs a newpackage declarationusing the given parameters- Parameters:
editable- Whether this package declaration is editable or notpackageName- The name of the package in the declaration
-
-
Method Details
-
getJavaCodeType
- Specified by:
getJavaCodeTypein interfaceJavaCodeType- Returns:
- What
typethis is
-
isEditable
public boolean isEditable()- Returns:
- Whether this
package declarationis editable or not
-
getPackageName
- Returns:
- The name of the package in this declaration
-
toString
- Overrides:
toStringin classObject- Returns:
- The Java code represented by this
package declaration
-
equals
-
toBuilderCode
- Specified by:
toBuilderCodein interfaceJavaCodeType- Returns:
- The String of code to build the
JavaCodeType
-