org.apache.avro.reflect

## 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 Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <V,R> Function<V,R>` | `getConstructorAsFunction(Class<V> parameterClass, Class<R> clazz)`
    `static org.apache.avro.reflect.FieldAccess` | `getFieldAccess()`
    `protected static Map<TypeVariable<?>,Type>` | `resolveTypeVariables(Class<?> iface)` For an interface, get a map of any `TypeVariable`s to their actual types.

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

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

- - ### Method Detail

    - #### 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 `TypeVariable`s to their actual types.
      Parameters:
        `iface` - interface to resolve types for.
      Returns:
        a map of `TypeVariable`s to actual types.

    - #### getConstructorAsFunction

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

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.