Class DefaultResourceQuery<T extends Resource>

java.lang.Object
org.jdrupes.builder.core.DefaultResourceQuery<T>
Type Parameters:
T - the generic type
All Implemented Interfaces:
ResourceQuery<T>

public class DefaultResourceQuery<T extends Resource> extends Object implements ResourceQuery<T>

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.