Class Field
java.lang.Object
be.imgn.gaia.processing.source.Field
A field, such as
private static final int LIMIT = 10;.
Fields are values: two fields written the same are equal.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturns the declaration annotations.booleaninthashCode()Returns the initializer.javadoc()Returns the Javadoc.Returns the modifiers.name()Returns the name.static Field.BuildernewBuilder(TypeName type, String name, Modifier... modifiers) Returns a builder of fields.static Field.BuildernewBuilder(Class<?> type, String name, Modifier... modifiers) Returns a builder of fields.static FieldReturns a field without initializer.Returns a builder that starts with this field.toString()type()Returns the type.
-
Method Details
-
of
Returns a field without initializer.- Parameters:
type- the typename- the namemodifiers- the modifiers- Returns:
- the field
- Throws:
IllegalArgumentException- if the name is not a valid identifier, or a modifier is not allowed on a field
-
newBuilder
Returns a builder of fields.- Parameters:
type- the typename- the namemodifiers- the modifiers- Returns:
- a new builder
- Throws:
IllegalArgumentException- if the name is not a valid identifier, or a modifier is not allowed on a field
-
newBuilder
Returns a builder of fields.- Parameters:
type- the typename- the namemodifiers- the modifiers- Returns:
- a new builder
- Throws:
IllegalArgumentException- if the name is not a valid identifier, or a modifier is not allowed on a field
-
type
-
name
-
modifiers
-
annotations
Returns the declaration annotations.- Returns:
- the annotations, in order
-
javadoc
-
initializer
Returns the initializer.- Returns:
- the expression after
=, empty if there is none
-
toBuilder
Returns a builder that starts with this field.- Returns:
- a new builder
-
equals
-
hashCode
-
toString
-