Interface ResourceQuery<T extends Resource>

Type Parameters:
T - the collected type
All Known Implementing Classes:
DefaultResourceQuery

public interface ResourceQuery<T extends Resource>

Represents a request for Resources of a specified type. The specified type provides two kinds of type information:

  1. The type of the Resources that are actually provided.
  2. The type of the "context" in which the Resources are to be provided.

As an example, consider requests for a compile time and a runtime classpath. In both cases, the actually provided Resources are of type "classpath element". However, depending on the kind of classpath, a ResourceProvider may deliver different collections of instances of "classpath elements". So instead of requesting "classpath element",

Not all requested resource types require context information. For example, a request for Cleanliness usually refers to all resources that a Generator has created and does not depend on a context. However, in order to keep the API simple, the context is always required.