FileDocCategorySizeDatePackage
MethodFinder.javaAPI DocExample1802Wed Apr 19 11:17:18 BST 2000com.sun.tools.doclets

MethodFinder

public abstract class MethodFinder extends Object
This class is useful for searching a method which has documentation comment and documentation tags. The method is searched in all the superclasses and interfaces(subsequently super-interfaces also) recursively.

Fields Summary
Constructors Summary
Methods Summary
abstract booleanisCorrectMethod(com.sun.javadoc.MethodDoc method)

public com.sun.javadoc.MethodDocsearch(com.sun.javadoc.ClassDoc cd, com.sun.javadoc.MethodDoc method)

        MethodDoc meth = searchInterfaces(cd, method);
        if (meth != null) {
            return meth;
        }
        ClassDoc icd = cd.superclass();        
        if (icd != null) {
            meth = Util.findMethod(icd, method);
            if (meth != null) {
  	        if (isCorrectMethod(meth)) {
                    return meth;
                }
            }
            return search(icd, method);
        }
        return null;
    
public com.sun.javadoc.MethodDocsearchInterfaces(com.sun.javadoc.ClassDoc cd, com.sun.javadoc.MethodDoc method)

        ClassDoc[] iin = cd.interfaces();
        for (int i = 0; i < iin.length; i++) {
            MethodDoc meth = Util.findMethod(iin[i], method);
            if (meth != null) {
	        if (isCorrectMethod(meth)) {
                    return meth;
                }
            }
        }
        for (int i = 0; i < iin.length; i++) {
            MethodDoc meth = searchInterfaces(iin[i], method);
            if (meth != null) {
                return meth;
            }
        }
        return null;