com.sun.tools.doclets.internal.toolkit.util
Class ImplementedMethods

java.lang.Object
  extended by com.sun.tools.doclets.internal.toolkit.util.ImplementedMethods

public class ImplementedMethods
extends java.lang.Object

For a given class method, build an array of interface methods which it implements. This code is not part of an API. It is implementation that is subject to change. Do not use it as an API


Field Summary
private  ClassDoc classdoc
           
private  Configuration configuration
           
private  java.util.Map<MethodDoc,Type> interfaces
           
private  java.util.List<MethodDoc> methlist
           
private  MethodDoc method
           
 
Constructor Summary
ImplementedMethods(MethodDoc method, Configuration configuration)
           
 
Method Summary
 MethodDoc[] build()
           
 MethodDoc[] build(boolean sort)
          Return the array of interface methods which the method passed in the constructor is implementing.
private  void buildImplementedMethodList(boolean sort)
          Search for the method in the array of interfaces.
 Type getMethodHolder(MethodDoc methodDoc)
           
private  boolean overridingMethodFound(MethodDoc method)
          Search in the already found methods' list and check if it contains a method which is overriding the method parameter or is the method parameter itself.
private  void removeOverriddenMethod(MethodDoc method)
          Search in the method list and check if it contains a method which is overridden by the method as parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interfaces

private java.util.Map<MethodDoc,Type> interfaces

methlist

private java.util.List<MethodDoc> methlist

configuration

private Configuration configuration

classdoc

private final ClassDoc classdoc

method

private final MethodDoc method
Constructor Detail

ImplementedMethods

public ImplementedMethods(MethodDoc method,
                          Configuration configuration)
Method Detail

build

public MethodDoc[] build(boolean sort)
Return the array of interface methods which the method passed in the constructor is implementing. The search/build order is as follows:
 1. Search in all the immediate interfaces which this method's class is
    implementing. Do it recursively for the superinterfaces as well.
 2. Traverse all the superclasses and search recursively in the
    interfaces which those superclasses implement.

Returns:
MethodDoc[] Array of implemented methods.

build

public MethodDoc[] build()

getMethodHolder

public Type getMethodHolder(MethodDoc methodDoc)

buildImplementedMethodList

private void buildImplementedMethodList(boolean sort)
Search for the method in the array of interfaces. If found check if it is overridden by any other subinterface method which this class implements. If it is not overidden, add it in the method list. Do this recursively for all the extended interfaces for each interface from the array passed.


removeOverriddenMethod

private void removeOverriddenMethod(MethodDoc method)
Search in the method list and check if it contains a method which is overridden by the method as parameter. If found, remove the overridden method from the method list.

Parameters:
method - Is this method overriding a method in the method list.

overridingMethodFound

private boolean overridingMethodFound(MethodDoc method)
Search in the already found methods' list and check if it contains a method which is overriding the method parameter or is the method parameter itself.

Parameters:
method - MethodDoc Method to be searched in the Method List for an overriding method.