Interface TypedFieldAccessor<T,​V>

  • Type Parameters:
    T - Containing class
    V - Class of contained field
    All Superinterfaces:
    java.util.function.BiConsumer<T,​V>, java.util.function.Function<T,​V>
    All Known Implementing Classes:
    SlowFieldAccessor

    public interface TypedFieldAccessor<T,​V>
    extends java.util.function.BiConsumer<T,​V>, java.util.function.Function<T,​V>
    Interface for a generic typed field accessor.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <T,​V>
      TypedFieldAccessor<T,​V>
      forField​(java.lang.Class<? super T> clazz, java.lang.String fieldName)  
      static <T,​V>
      TypedFieldAccessor<T,​V>
      forField​(java.lang.reflect.Field field)  
      • Methods inherited from interface java.util.function.BiConsumer

        accept, andThen
      • Methods inherited from interface java.util.function.Function

        andThen, apply, compose
    • Method Detail

      • forField

        static <T,​V> TypedFieldAccessor<T,​V> forField​(java.lang.Class<? super T> clazz,
                                                                  java.lang.String fieldName)
      • forField

        static <T,​V> TypedFieldAccessor<T,​V> forField​(java.lang.reflect.Field field)
                                                           throws java.lang.NoSuchFieldException,
                                                                  java.lang.IllegalAccessException
        Throws:
        java.lang.NoSuchFieldException
        java.lang.IllegalAccessException