Package yakworks.hibernate.proxy
Class ReflectToStringHelper
- java.lang.Object
-
- yakworks.hibernate.proxy.ReflectToStringHelper
-
public final class ReflectToStringHelper extends java.lang.ObjectUsed org.hibernate.internal.util.ReflectHelper as basis, which only support equals and hashcode this helps to check if toString is overriden so that by default we can support toString without it hydrating the proxy.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class[]NO_PARAM_SIGNATUREstatic java.lang.Object[]NO_PARAMS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.reflect.MethodextractToStringMethod(java.lang.Class clazz)Encapsulation of getting hold of a class'stoStringmethod.static booleanoverridesToString(java.lang.Class clazz)Determine if the given class defines aObject.toString()override.
-
-
-
Method Detail
-
extractToStringMethod
public static java.lang.reflect.Method extractToStringMethod(java.lang.Class clazz) throws java.lang.NoSuchMethodExceptionEncapsulation of getting hold of a class'stoStringmethod.- Parameters:
clazz- The class from which to extract the toString method.- Returns:
- The toString method reference
- Throws:
java.lang.NoSuchMethodException- Should indicate an attempt to extract toString method from interface.
-
overridesToString
public static boolean overridesToString(java.lang.Class clazz)
Determine if the given class defines aObject.toString()override.- Parameters:
clazz- The class to check- Returns:
- True if clazz defines an toString override.
-
-