Example usage for org.apache.commons.bcel6.classfile Method equals

List of usage examples for org.apache.commons.bcel6.classfile Method equals

Introduction

In this page you can find the example usage for org.apache.commons.bcel6.classfile Method equals.

Prototype

@Override
public boolean equals(Object obj) 

Source Link

Document

Return value as defined by given BCELComparator strategy.

Usage

From source file:ru.objective.jni.utils.Utils.java

public static HashSet<Method> getOverloadedMethods(Method[] methods) {
    HashSet<Method> result = new HashSet<>(methods.length);

    for (Method method : methods) {

        if (Utils.getMethodExportInfo(method) == null)
            continue;

        for (Method foundMethod : methods) {

            if (Utils.getMethodExportInfo(foundMethod) == null)
                continue;

            if (method.equals(foundMethod))
                continue;

            if (method.getName().equals(foundMethod.getName())
                    && method.getArgumentTypes().length == foundMethod.getArgumentTypes().length) {
                result.add(method);//from  w  ww  .jav a 2s  . co m
                break;
            }
        }
    }

    return result;
}