Utils.java Source code

Java tutorial

Introduction

Here is the source code for Utils.java

Source

import java.lang.reflect.Method;

public class Utils {
    public static boolean isJavaBeanCompliantSetter(Method method) {
        if (method == null)
            return false;

        if (method.getReturnType() != Void.TYPE)
            return false;

        if (!method.getName().startsWith("set"))
            return false;

        if (method.getParameterTypes().length != 1)
            return false;

        return true;
    }
}