public class FieldImp extends Object implements IFieldReader, IFieldWriter, Comparable<FieldImp>, Cloneable
| Constructor and Description |
|---|
FieldImp(String name,
Class<?> type)
Constructor to receive the field.
|
| Modifier and Type | Method and Description |
|---|---|
IAnnotationPropertyWriter |
annotation(Class<? extends Annotation> annotation)
Add an annotation to this.
|
IAnnotationPropertyWriter |
annotation(Class<? extends Annotation> annotation,
LocationEnum location)
Add an annotation and defining the location of it.
|
IAnnotationPropertyWriter |
annotation(IAnnotationReader annotation)
Add a annotation wrapper to this.
|
Collection<IAnnotationReader> |
annotations()
Inform the annotations that you want in your field.
|
Object |
clone() |
int |
compareTo(FieldImp other) |
boolean |
equals(Object obj) |
Class<?> |
generics()
Inform the parameter type of your field.
|
IFieldWriter |
generics(Class<?> generics)
Define the parameter type of your field.
|
boolean |
hasGetter()
Inform if is necessary to generate a getter method for this field.
|
IFieldWriter |
hasGetter(boolean getter)
Define if is necessary to generate a getter method for this field.
|
int |
hashCode() |
boolean |
hasSetter()
Inform if is necessary to generate a setter method for this field.
|
IFieldWriter |
hasSetter(boolean setter)
Define if is necessary to generate a setter method for this field.
|
Collection<ModifierEnum> |
modifiers()
Inform the modifiers that you want in your field.
|
IFieldWriter |
modifiers(ModifierEnum... modifiers)
Define the modifiers that you want in your field.
|
String |
name()
Inform the name of your field.
|
IFieldWriter |
name(String name)
Define the name of your field.
|
String |
toString() |
Class<?> |
type()
Inform the class type of your field.
|
IFieldWriter |
type(Class<?> type)
Define the class type of your field.
|
Object |
value()
Define the field's initial value.
|
IFieldWriter |
value(Object value)
Define the field's initial value.
|
VisibilityEnum |
visibility()
Inform the visibility of your field.
|
IFieldWriter |
visibility(VisibilityEnum visibility)
Define the visibility for your field.
|
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic IFieldWriter name(String name)
IFieldWritername in interface IFieldWritername - of the fieldpublic IFieldWriter type(Class<?> type)
IFieldWritertype in interface IFieldWritertype - of the fieldpublic IFieldWriter generics(Class<?> generics)
IFieldWritergenerics in interface IFieldWritergenerics - of the fieldpublic IFieldWriter value(Object value)
IFieldWriterInteger, a Float, a Long, a
Double or a String (for int,
float, long or String fields
respectively). This parameter is only used for static
fields. Its value is ignored for non static fields, which
must be initialized through bytecode instructions in
constructors or methods.value in interface IFieldWritervalue - of the fieldpublic IFieldWriter visibility(VisibilityEnum visibility)
IFieldWriterEx: PUBLIC, PRIVATE or PROTECTED
visibility in interface IFieldWritervisibility - of the fieldpublic IFieldWriter modifiers(ModifierEnum... modifiers)
IFieldWriterEx: FINAL, STATIC...
modifiers in interface IFieldWritermodifiers - of the fieldpublic IAnnotationPropertyWriter annotation(Class<? extends Annotation> annotation)
IAnnotationWriterannotation in interface IAnnotationWriterannotation - to associatepublic IAnnotationPropertyWriter annotation(Class<? extends Annotation> annotation, LocationEnum location)
IAnnotationWriterannotation in interface IAnnotationWriterannotation - to associatelocation - to bepublic IAnnotationPropertyWriter annotation(IAnnotationReader annotation)
IAnnotationWriterannotation in interface IAnnotationWriterannotation - to associatepublic String name()
IFieldReadername in interface IFieldReaderpublic Class<?> type()
IFieldReadertype in interface IFieldReaderpublic Class<?> generics()
IFieldReadergenerics in interface IFieldReaderpublic Object value()
IFieldReaderInteger, a Float, a Long, a
Double or a String (for int,
float, long or String fields
respectively). This parameter is only used for static
fields. Its value is ignored for non static fields, which
must be initialized through bytecode instructions in
constructors or methods.value in interface IFieldReaderpublic VisibilityEnum visibility()
IFieldReadervisibility in interface IFieldReaderpublic Collection<ModifierEnum> modifiers()
IFieldReadermodifiers in interface IFieldReaderpublic Collection<IAnnotationReader> annotations()
IFieldReaderannotations in interface IFieldReaderpublic IFieldWriter hasGetter(boolean getter)
IFieldWriterhasGetter in interface IFieldWritergetter - if the field should have the getter methodpublic IFieldWriter hasSetter(boolean setter)
IFieldWriterhasSetter in interface IFieldWritersetter - if the field should have the setter methodpublic boolean hasGetter()
IFieldReaderhasGetter in interface IFieldReaderpublic boolean hasSetter()
IFieldReaderhasSetter in interface IFieldReaderpublic int compareTo(FieldImp other)
compareTo in interface Comparable<FieldImp>Copyright © 2018 Esfinge Framework. All rights reserved.