Class JavaField
java.lang.Object
com.github.tadukoo.parsing.code.java.JavaField
Java Field represents a field in a
Java class- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJava Field Builder is a builder to create aJavaField. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<JavaAnnotation>Theannotationson the fieldprivate final booleanWhether the field is final or notprivate final StringThe name of the fieldprivate final StringThe type of the fieldprivate final StringThe value assigned to the fieldprivate final VisibilityTheVisibilityof the field -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJavaField(List<JavaAnnotation> annotations, Visibility visibility, boolean isFinal, String type, String name, String value) Constructs a Java Field with the given parameters -
Method Summary
-
Field Details
-
annotations
Theannotationson the field -
visibility
TheVisibilityof the field -
isFinal
private final 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
private JavaField(List<JavaAnnotation> annotations, Visibility visibility, boolean isFinal, String type, String name, String value) Constructs a Java Field with the given parameters- Parameters:
annotations- Theannotationson the fieldvisibility- TheVisibilityof the fieldisFinal- 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
-
builder
- Returns:
- A new
JavaField.JavaFieldBuilderto create a newJavaField
-
getAnnotations
- Returns:
- The
annotationson the field
-
getVisibility
- Returns:
- The
Visibilityof the field
-
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
-