A method bucket is used to identify unique methods of all super types and interfaces of a given type. A
method bucket will therefore always filter any declared method of identical signature that was already
added to the bucket by pushing a previous type. For this to work, a method bucket's methods must be invoked
in a given order:
- A user needs to push all classes into the method bucket, beginning with the most specific class down to
the
Object class. By pushing classes first, interface methods can never override
a method that was declared by a class.
- A user needs to push all interfaces that war registered on any of these classes into the bucket. The
bucket will make sure that no interface is processed twice by remembering interfaces that were already
pushed. The method bucket will furthermore process extension interfaces of any pushed interface. Whenever
an interface method is registered, several possible scenarios can occur:
- A method of the interface was already declared by a class: These methods are always ignored.
- A method of the interface was already declared by a sub interface: In this case, the method.