avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Wanting delegates
Date Thu, 03 Oct 2002 04:55:14 GMT
Delegates are the key to programming intelligent agents--such as the type
that would be needed to determine the best set of components for an
assembly file.  The proper matching can be performed with generic search
algorithms that use specific methods as parameters to the search algorithm.

I decided that it would be relatively easy to throw together an inheritance
based Delegate mechanism.  The class is in Excalibur Util along with an example
in the TestCase.

There are some limitations to the Delegate mechanism:

1) the Object must be accessible to the org.apache.excalibur.util package
    (which means that the object is public).

2) the method must be public--no other access level will even be considered.

3) The method cannot be named the same as any of the standard Object methods.

These are out of necessity and the way the reflection package works.
The reason the method names cannot be the same as any standard Object method
is that there is no other way to determine what method the Delegate needs
to implement.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message