public static java.util.Collection<java.lang.Class<?>> search(java.lang.Class<?> clazz,
Returns all the classes and interfaces that are referenced by the public methods declared by the given class. A class considered to be
referenced by a method if either of the following holds 1) The class or its superclass or an interface it implements is mentioned in the
signature of the method as an argument or as a return type either directly or as a type of an array or a collection. 2) The class or its
superclass or an interface it implements is used as a return type of a getter method in a class referenced (note recursion here) by a method.
However, the following kind of classes never considered to be referenced: 1) Anonymous classes 2) Classes that are not defined within package
clazz - class whose references should be searched.