Class ReflectionUtil

java.lang.Object
org.apache.avro.reflect.ReflectionUtil

public class ReflectionUtil extends Object
A few utility methods for using @link{java.misc.Unsafe}, mostly for private use. Use of Unsafe on Android is forbidden, as Android provides only a very limited functionality for this class compared to the JDK version. InterfaceAudience.Private
  • Method Details

    • getFieldAccess

      public static org.apache.avro.reflect.FieldAccess getFieldAccess()
    • resolveTypeVariables

      protected static Map<TypeVariable<?>,Type> resolveTypeVariables(Class<?> iface)
      For an interface, get a map of any TypeVariables to their actual types.
      Parameters:
      iface - interface to resolve types for.
      Returns:
      a map of TypeVariables to actual types.
    • getConstructorAsFunction

      public static <V, R> Function<V,R> getConstructorAsFunction(Class<V> parameterClass, Class<R> clazz)