Package com.github.tadukoo.java
Class JavaField
java.lang.Object
com.github.tadukoo.java.JavaField
- Direct Known Subclasses:
EditableJavaField,UneditableJavaField
Java Field represents a field in a
Java class- Since:
- Alpha v.0.2 (as old version that is now more like UneditableJavaField), Alpha v.0.4 (as newer version)
- Version:
- Alpha v.0.4
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<JavaAnnotation>Theannotationson the fieldprotected booleanWhether the field is final or notprotected booleanWhether the field is static or notprotected JavadocTheJavadocon the fieldprotected StringThe name of the fieldprotected StringThe section comment above the fieldprotected StringThe type of the fieldprotected StringThe value assigned to the fieldprotected VisibilityTheVisibilityof the field -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaField(boolean editable, String sectionComment, Javadoc javadoc, List<JavaAnnotation> annotations, Visibility visibility, boolean isStatic, boolean isFinal, String type, String name, String value) Constructs a Java Field with the given parameters -
Method Summary
-
Field Details
-
sectionComment
The section comment above the field -
javadoc
TheJavadocon the field -
annotations
Theannotationson the field -
visibility
TheVisibilityof the field -
isStatic
protected boolean isStaticWhether the field is static or not -
isFinal
protected boolean isFinalWhether the field is final or not -
type
The type of the field -
name
The name of the field -
value
The value assigned to the field
-
-
Constructor Details
-
JavaField
protected JavaField(boolean editable, String sectionComment, Javadoc javadoc, List<JavaAnnotation> annotations, Visibility visibility, boolean isStatic, boolean isFinal, String type, String name, String value) Constructs a Java Field with the given parameters- Parameters:
editable- Whether the field is editable or notsectionComment- The section comment above the fieldjavadoc- TheJavadocon the fieldannotations- Theannotationson the fieldvisibility- TheVisibilityof the fieldisStatic- Whether the field is static or notisFinal- Whether the field is final or nottype- The type of the fieldname- The name of the fieldvalue- The value assigned to the field
-
-
Method Details
-
isEditable
public boolean isEditable()- Returns:
- Whether the field is editable or not
-
getSectionComment
- Returns:
- The section comment above the field
-
getJavadoc
- Returns:
- The
Javadocon the field
-
getAnnotations
- Returns:
- The
annotationson the field
-
getVisibility
- Returns:
- The
Visibilityof the field
-
isStatic
public boolean isStatic()- Returns:
- Whether the field is static or not
-
isFinal
public boolean isFinal()- Returns:
- Whether the field is final or not
-
getType
- Returns:
- The type of the field
-
getName
- Returns:
- The name of the field
-
getValue
- Returns:
- The value assigned to the field
-
toString
-
equals
-