|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface QueryMechanism
provides a generic way to query an object for flexible functionality
| Method Summary | ||
|---|---|---|
|
query(Class<T> requiredReturnType,
Object context)
queries the instance for an object of the given type that is appropriate for the given context. |
|
| Method Detail |
|---|
<T> T query(Class<T> requiredReturnType,
Object context)
throws IOException,
IllegalArgumentException
T - the required return typerequiredReturnType - specifies the return type that is needed for this operation;
if Object.class is given, any returned object is admissiblecontext - provides a context parameter for which the desired instance is to be returned.
Often (if no other meaningful context is required or applicable), it makes sense to pass a reference
to the calling object source; null may also be allowed
IOException - if any resource could not be acquired to fulfill the given query
IllegalArgumentException - if either parameter is generally not acceptable by the implementation
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||