Package org.apache.avro.reflect
Class ReflectionUtil
java.lang.Object
org.apache.avro.reflect.ReflectionUtil
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
Modifier and TypeMethodDescriptionstatic <V,
R> Function <V, R> getConstructorAsFunction
(Class<V> parameterClass, Class<R> clazz) static org.apache.avro.reflect.FieldAccess
protected static Map
<TypeVariable<?>, Type> resolveTypeVariables
(Class<?> iface) For an interface, get a map of anyTypeVariable
s to their actual types.
-
Method Details
-
getFieldAccess
public static org.apache.avro.reflect.FieldAccess getFieldAccess() -
resolveTypeVariables
For an interface, get a map of anyTypeVariable
s to their actual types.- Parameters:
iface
- interface to resolve types for.- Returns:
- a map of
TypeVariable
s to actual types.
-
getConstructorAsFunction
-