Class AccessibleObjectUtil


  • public class AccessibleObjectUtil
    extends Object
    Methods to handle AccessibleObjects (field and methods) in a similar manner
    • Method Detail

      • getType

        public static Class<?> getType​(AccessibleObject accessibleObject)
        Get the property type (assuming it's either a field or a getter method)
        Parameters:
        accessibleObject -
        Returns:
      • getGenericType

        public static Type getGenericType​(AccessibleObject accessibleObject)
        Get the genericproperty type (assuming it's either a field or a getter method)
        Parameters:
        accessibleObject -
        Returns:
      • getFieldName

        public static String getFieldName​(AccessibleObject o)
        Return field name or extract property name from getter method name if needed
        Parameters:
        o - Field or Method
        Returns:
        String of extracted name, or null if not able to convert