# Class FieldAccess

java.lang.Object
com.esotericsoftware.reflectasm.FieldAccess

public abstract class FieldAccess extends Object

## Constructor Summary

Constructors
Constructor
Description
`FieldAccess()`

## Method Summary

Modifier and Type
Method
Description
`static FieldAccess`
`get(Class type)`
`abstract Object`
`get(Object instance, int fieldIndex)`
`Object`
`get(Object instance, String fieldName)`
`abstract boolean`
`getBoolean(Object instance, int fieldIndex)`
`abstract byte`
`getByte(Object instance, int fieldIndex)`
`abstract char`
`getChar(Object instance, int fieldIndex)`
`abstract double`
`getDouble(Object instance, int fieldIndex)`
`int`
`getFieldCount()`
`String[]`
`getFieldNames()`
`Field[]`
`getFields()`
`Class[]`
`getFieldTypes()`
`abstract float`
`getFloat(Object instance, int fieldIndex)`
`int`
`getIndex(Field field)`
`int`
`getIndex(String fieldName)`
`abstract int`
`getInt(Object instance, int fieldIndex)`
`abstract long`
`getLong(Object instance, int fieldIndex)`
`abstract short`
`getShort(Object instance, int fieldIndex)`
`abstract String`
`getString(Object instance, int fieldIndex)`
`abstract void`
`set(Object instance, int fieldIndex, Object value)`
`void`
`set(Object instance, String fieldName, Object value)`
`abstract void`
`setBoolean(Object instance, int fieldIndex, boolean value)`
`abstract void`
`setByte(Object instance, int fieldIndex, byte value)`
`abstract void`
`setChar(Object instance, int fieldIndex, char value)`
`abstract void`
`setDouble(Object instance, int fieldIndex, double value)`
`void`
`setFields(Field[] fields)`
`abstract void`
`setFloat(Object instance, int fieldIndex, float value)`
`abstract void`
`setInt(Object instance, int fieldIndex, int value)`
`abstract void`
`setLong(Object instance, int fieldIndex, long value)`
`abstract void`
`setShort(Object instance, int fieldIndex, short value)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FieldAccess

public FieldAccess()

## Method Details

### getIndex

public int getIndex(String fieldName)

### getIndex

public int getIndex(Field field)

### set

public void set(Object instance, String fieldName, Object value)

### get

public Object get(Object instance, String fieldName)

### getFieldNames

public String[] getFieldNames()

### getFieldTypes

public Class[] getFieldTypes()

### getFieldCount

public int getFieldCount()

### getFields

public Field[] getFields()

### setFields

public void setFields(Field[] fields)

### set

public abstract void set(Object instance, int fieldIndex, Object value)

### setBoolean

public abstract void setBoolean(Object instance, int fieldIndex, boolean value)

### setByte

public abstract void setByte(Object instance, int fieldIndex, byte value)

### setShort

public abstract void setShort(Object instance, int fieldIndex, short value)

### setInt

public abstract void setInt(Object instance, int fieldIndex, int value)

### setLong

public abstract void setLong(Object instance, int fieldIndex, long value)

### setDouble

public abstract void setDouble(Object instance, int fieldIndex, double value)

### setFloat

public abstract void setFloat(Object instance, int fieldIndex, float value)

### setChar

public abstract void setChar(Object instance, int fieldIndex, char value)

### get

public abstract Object get(Object instance, int fieldIndex)

### getString

public abstract String getString(Object instance, int fieldIndex)

### getChar

public abstract char getChar(Object instance, int fieldIndex)

### getBoolean

public abstract boolean getBoolean(Object instance, int fieldIndex)

### getByte

public abstract byte getByte(Object instance, int fieldIndex)

### getShort

public abstract short getShort(Object instance, int fieldIndex)

### getInt

public abstract int getInt(Object instance, int fieldIndex)

### getLong

public abstract long getLong(Object instance, int fieldIndex)

### getDouble

public abstract double getDouble(Object instance, int fieldIndex)

### getFloat

public abstract float getFloat(Object instance, int fieldIndex)

### get

public static FieldAccess get(Class type)

Parameters:
  `type` - Must not be the Object class, an interface, a primitive type, or void.