Package net.minidev.asm
Class Accessor
- java.lang.Object
-
- net.minidev.asm.Accessor
-
public class Accessor extends Object
Contains all information needed to access a java field. field, getter setter this object is used internally by BeansAccess- Author:
- Uriel Chemouni
- See Also:
BeansAccess
-
-
Field Summary
Fields Modifier and Type Field Description protected Field
field
Field to accessprotected String
fieldName
protected Type
genericType
Filed Type using JDK 5+ generics if availableprotected Method
getter
getter Methods if availableprotected int
index
Filed index in objectprotected Method
setter
Setter Methods if availableprotected Class<?>
type
Filed Class
-
Constructor Summary
Constructors Constructor Description Accessor(Class<?> c, Field field, FieldFilter filter)
build accessor for a field
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type
getGenericType()
return generics field Type.int
getIndex()
getter for indexString
getName()
return the field nameClass<?>
getType()
return field Classboolean
isEnum()
is the field is an enum fieldboolean
isPublic()
is the field access using Field access typeboolean
isReadable()
boolean
isUsable()
boolean
isWritable()
-
-
-
Field Detail
-
field
protected Field field
Field to access
-
setter
protected Method setter
Setter Methods if available
-
getter
protected Method getter
getter Methods if available
-
index
protected int index
Filed index in object
-
type
protected Class<?> type
Filed Class
-
genericType
protected Type genericType
Filed Type using JDK 5+ generics if available
-
fieldName
protected String fieldName
-
-
Constructor Detail
-
Accessor
public Accessor(Class<?> c, Field field, FieldFilter filter)
build accessor for a field- Parameters:
c
- the handled classfield
- the field to access
-
-
Method Detail
-
getIndex
public int getIndex()
getter for index- Returns:
- Index
-
isPublic
public boolean isPublic()
is the field access using Field access type- Returns:
- if Accessor is public
-
isEnum
public boolean isEnum()
is the field is an enum field- Returns:
- if Accessor return an Enum Class
-
getName
public String getName()
return the field name- Returns:
- the field name
-
getType
public Class<?> getType()
return field Class- Returns:
- field Class
-
getGenericType
public Type getGenericType()
return generics field Type.- Returns:
- generics field Type.
-
isUsable
public boolean isUsable()
- Returns:
- true if the field can be read or write
-
isReadable
public boolean isReadable()
- Returns:
- true if the field can be read
-
isWritable
public boolean isWritable()
- Returns:
- true if the field can be write
-
-