Package com.github.tadukoo.java.field
Class EditableJavaField
java.lang.Object
com.github.tadukoo.java.field.JavaField
com.github.tadukoo.java.field.EditableJavaField
- All Implemented Interfaces:
JavaCodeType,JavaTokens
Represents a field in Java that can be modified
- Since:
- Alpha v.0.4
- Version:
- Beta v.0.5
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.github.tadukoo.java.field.JavaField
annotations, isFinal, isStatic, javadoc, name, type, value, visibilityFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(JavaAnnotation annotation) voidaddAnnotations(List<JavaAnnotation> annotations) builder()voidsetAnnotations(List<JavaAnnotation> annotations) voidsetFinal(boolean isFinal) voidsetJavadoc(Javadoc javadoc) voidvoidsetStatic(boolean isStatic) voidvoidvoidsetVisibility(Visibility visibility) Methods inherited from class com.github.tadukoo.java.field.JavaField
equals, getAnnotations, getJavaCodeType, getJavadoc, getName, getType, getValue, getVisibility, isEditable, isFinal, isStatic, toBuilderCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.tadukoo.java.JavaCodeType
escapeQuotes
-
Method Details
-
builder
- Returns:
- A new
EditableJavaField.EditableJavaFieldBuilderto use to build a newEditableJavaField
-
setJavadoc
- Parameters:
javadoc- TheJavadocon the field
-
addAnnotation
- Parameters:
annotation- Anannotationto add to the field (must be editable)
-
addAnnotations
- Parameters:
annotations-annotationsto add to the field (must be editable)
-
setAnnotations
- Parameters:
annotations- Theannotationson the field (must be editable)
-
setVisibility
- Parameters:
visibility- TheVisibilityof the field
-
setStatic
public void setStatic(boolean isStatic) - Parameters:
isStatic- Whether the field is static or not
-
setFinal
public void setFinal(boolean isFinal) - Parameters:
isFinal- Whether the field is final or not
-
setType
- Parameters:
type- The type of the field
-
setName
- Parameters:
name- The name of the field
-
setValue
- Parameters:
value- The value assigned to the field
-