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
Modifier and TypeClassDescriptionstatic class
Java Field Builder is a builder to create aJavaField
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final List<JavaAnnotation>
Theannotations
on the fieldprivate final boolean
Whether the field is final or notprivate final String
The name of the fieldprivate final String
The type of the fieldprivate final String
The value assigned to the fieldprivate final Visibility
TheVisibility
of the field -
Constructor Summary
ModifierConstructorDescriptionprivate
JavaField
(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
Theannotations
on the field -
visibility
TheVisibility
of 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
- Theannotations
on the fieldvisibility
- TheVisibility
of 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.JavaFieldBuilder
to create a newJavaField
-
getAnnotations
- Returns:
- The
annotations
on the field
-
getVisibility
- Returns:
- The
Visibility
of 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
-