Package ghidra.framework.plugintool

# Class AutoConfigState.ConfigStateField<T>

java.lang.Object
ghidra.framework.plugintool.AutoConfigState.ConfigStateField<T>

Enclosing interface:
  `AutoConfigState`

public static class AutoConfigState.ConfigStateField<T> extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> AutoConfigState.ConfigFieldCodec<T>`
  `getCodecByType(Class<T> cls)`
  `static <T> T`
  `getState(SaveState state, Class<T> type, String name)`
  Get an object from a `SaveState` using a known codec
  `static <T> void`
  `putState(SaveState state, Class<T> type, String name, T value)`
  Put an object into a `SaveState` using a known codec

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

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

- ## Method Details

  - ### getCodecByType

    public static <T> AutoConfigState.ConfigFieldCodec<T> getCodecByType(Class<T> cls)

  - ### putState

    public static <T> void putState(SaveState state, Class<T> type, String name, T value)
    Put an object into a `SaveState` using a known codec

    This seems like something that should be in SaveState itself, but the object value must be one of the supported types.

    Type Parameters:
      `T` - the type of the value
    Parameters:
      `state` - the state to write into
      `type` - the type of the value
      `name` - the name of the name-value pair
      `value` - the value of the name-value pair

  - ### getState

    public static <T> T getState(SaveState state, Class<T> type, String name)
    Get an object from a `SaveState` using a known codec

    This seems like something that should be in SaveState itself.

    Type Parameters:
      `T` - the type of the value
    Parameters:
      `state` - the state to read from
      `type` - the expected type of the value
      `name` - the name of the name-value pair
    Returns:
      the value of the name-value pair