Example usage for org.springframework.util ClassUtils hasAtLeastOneMethodWithName

List of usage examples for org.springframework.util ClassUtils hasAtLeastOneMethodWithName

Introduction

In this page you can find the example usage for org.springframework.util ClassUtils hasAtLeastOneMethodWithName.

Prototype

public static boolean hasAtLeastOneMethodWithName(Class<?> clazz, String methodName) 

Source Link

Document

Does the given class or one of its superclasses at least have one or more methods with the supplied name (with any argument types)?

Usage

From source file:org.springframework.flex.remoting.RemotingDestinationExporter.java

private List<RemotingMethod> getRemotingMethods(String[] methodNames) {
    List<RemotingMethod> remotingMethods = new ArrayList<RemotingMethod>();
    for (String name : methodNames) {
        Class<?> classToCheck = this.sourceClass != null ? this.sourceClass : this.service.getClass();
        Assert.isTrue(ClassUtils.hasAtLeastOneMethodWithName(classToCheck, name),
                "Could not find method with name '" + name + "' on the exported service of type "
                        + classToCheck);
        RemotingMethod method = new RemotingMethod();
        method.setName(name);//from   ww  w  . j  a  va2s . co m
        remotingMethods.add(method);
    }
    return remotingMethods;
}