Class MethodIterator
java.lang.Object
org.apache.tapestry5.ioc.internal.services.MethodIterator
Utility used to iterate over the publicly visible methods of a class or interface. The MethodIterator understands
some complications that can occur when a class inherits the same method from multiple interfaces and with slightly
different signatures (due to the fact that declared thrown exceptions can vary slightly for the "same" method).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the methodpublic String toString()
is part of the interface.boolean
hasNext()
static boolean
isToString
(Method method) Returns true if the method is the standard toString() method.next()
Returns the next method (as aMethodSignature
, returning null when all are exhausted.
-
Constructor Details
-
MethodIterator
-
-
Method Details
-
isToString
Returns true if the method is the standard toString() method. Very few interfaces will ever include this method as part of the interface, but we have to be sure. -
hasNext
-
next
Returns the next method (as aMethodSignature
, returning null when all are exhausted. Each method signature is returned exactly once (even if the same method signature is defined in multiple inherited classes or interfaces). The method signatures returned in ascending order, according to the "natural ordering".- Throws:
NoSuchElementException
- if there are no more signatures
-
getToString
Returns true if the methodpublic String toString()
is part of the interface. This will be known immediately after iterator contruction (it is not necessary to iterate the methods first).
-