Class TypeResolver


  • public final class TypeResolver
    extends Object
    Utility class to map from a Java 5 Type to the Class that is represented by this Type at runtime.
    • Method Detail

      • resolvePropertyType

        public static Class<?> resolvePropertyType​(Class<?> targetClass,
                                                   Method readMethod,
                                                   Method writeMethod)
        Try to resolve the property type for the supplied methods and target class. The supplied read and write methods should resemble a Java bean property (setter and getter)
        Parameters:
        targetClass - the target class of the property
        readMethod - the read method of the property
        writeMethod - the write method of the property
        Returns:
        the actual class of the property type