Example usage for org.springframework.aop.support AopUtils isFinalizeMethod

List of usage examples for org.springframework.aop.support AopUtils isFinalizeMethod

Introduction

In this page you can find the example usage for org.springframework.aop.support AopUtils isFinalizeMethod.

Prototype

public static boolean isFinalizeMethod(@Nullable Method method) 

Source Link

Document

Determine whether the given method is a "finalize" method.

Usage

From source file:org.springframework.integration.handler.support.MessagingMethodInvokerHelper.java

private static boolean isMethodDefinedOnObjectClass(Method method) {
    return method != null && (method.getDeclaringClass().equals(Object.class)
            || ReflectionUtils.isEqualsMethod(method) || ReflectionUtils.isHashCodeMethod(method)
            || ReflectionUtils.isToStringMethod(method) || AopUtils.isFinalizeMethod(method)
            || (method.getName().equals("clone") && method.getParameterTypes().length == 0));
}

From source file:org.springframework.integration.util.MessagingMethodInvokerHelper.java

private static boolean isMethodDefinedOnObjectClass(Method method) {
    if (method == null) {
        return false;
    }/*from   w  w w  .  j  a  v  a  2 s.  c om*/
    if (method.getDeclaringClass().equals(Object.class)) {
        return true;
    }
    if (ReflectionUtils.isEqualsMethod(method) || ReflectionUtils.isHashCodeMethod(method)
            || ReflectionUtils.isToStringMethod(method) || AopUtils.isFinalizeMethod(method)) {
        return true;
    }
    return (method.getName().equals("clone") && method.getParameterTypes().length == 0);
}