Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    @SuppressWarnings("unchecked")
    public static boolean hasMethod(Class clazz, String methodName, Class paramTypes[]) {
        try {
            clazz.getMethod(methodName, paramTypes);
            return true;
        } catch (NoSuchMethodException ex) {
            return false;
        }
    }
}