Package commoble.infiniverse.internal

# Class ReflectionBuddy

java.lang.Object
commoble.infiniverse.internal.ReflectionBuddy

public class ReflectionBuddy extends Object

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ReflectionBuddy.DelegateBorderChangeListenerAccess`
`static class`
`ReflectionBuddy.MinecraftServerAccess`
fields in MinecraftServer needed for registering dimensions
`static class`
`ReflectionBuddy.MutableInstanceField<FIELDHOLDER,FIELDTYPE>`
`static class`
`ReflectionBuddy.WorldBorderAccess`
`static class`
`ReflectionBuddy.WorldGenSettingsAccess`

## Constructor Summary

Constructors
Constructor
Description
`ReflectionBuddy()`

## Method Summary

Modifier and Type
Method
Description
`static <FIELDHOLDER, FIELDTYPE>
ReflectionBuddy.MutableInstanceField<FIELDHOLDER,FIELDTYPE>`
`getInstanceField(Class<FIELDHOLDER> fieldHolderClass, String fieldName)`
`static <FIELDHOLDER, FIELDTYPE>
Function<FIELDHOLDER,FIELDTYPE>`
`getInstanceFieldGetter(Class<FIELDHOLDER> fieldHolderClass, String fieldName)`
Gets a getter-like object for a reflective field.

### Methods inherited from class java.lang.Object

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

## Constructor Details

### ReflectionBuddy

public ReflectionBuddy()

## Method Details

### getInstanceFieldGetter

public static <FIELDHOLDER, FIELDTYPE> Function<FIELDHOLDER,FIELDTYPE> getInstanceFieldGetter(Class<FIELDHOLDER> fieldHolderClass, String fieldName)
Gets a getter-like object for a reflective field. Only to be used for obfuscatable vanilla minecraft fields

Type Parameters:
  `FIELDHOLDER` - The type of the object containing the field
  `FIELDTYPE` - The type of the values the field would contain
Parameters:
  `fieldHolderClass` - The class of the object containing the field
  `fieldName` - The SRG (intermediary-obfuscated) name of the field
Returns:
  A getter for the field

### getInstanceField

public static <FIELDHOLDER, FIELDTYPE> ReflectionBuddy.MutableInstanceField<FIELDHOLDER,FIELDTYPE> getInstanceField(Class<FIELDHOLDER> fieldHolderClass, String fieldName)