All Known Implementing Classes:
DottedResolver

public interface KeyResolver
Represents a resolver of config keys, which boxes and unboxes them.
Since:
2.0.1
Author:
MrIvanPlays
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final KeyResolver
    Returns the default key resolver used by AnnotationConfig.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    boxTo(String key, Object value, Map<String,Object> values)
    AnnotationConfig calls this method whenever it needs to populate the specified Map values with the specified value and specified key.
    unbox(String key, Map<String,Object> values)
    AnnotationConfig calls this method whenever it needs the value of the specified key.
  • Field Details

    • DEFAULT

      static final KeyResolver DEFAULT
      Returns the default key resolver used by AnnotationConfig.
  • Method Details

    • unbox

      Object unbox(String key, Map<String,Object> values)
      AnnotationConfig calls this method whenever it needs the value of the specified key.

      Keep in mind just because modification of the inputted Map values won't bug you it does not mean it goes without consequences. It is strongly not recommended as it may alter the set values.

      Parameters:
      key - the key of the value
      values - the values to unbox it from
      Returns:
      value or null
    • boxTo

      void boxTo(String key, Object value, Map<String,Object> values)
      AnnotationConfig calls this method whenever it needs to populate the specified Map values with the specified value and specified key.
      Parameters:
      key - the key of the value
      value - the value to box
      values - the place where the value shall be put