grapht icon indicating copy to clipboard operation
grapht copied to clipboard

Support default types for qualifiers

Open mdekstrand opened this issue 11 years ago • 1 comments

Proposal (maybe we've already discussed):

Add a @DefaultType annotation to Grapht that can be applied to qualifiers. When applied, the qualifier can be bound as

builder.bind(Qualifier.class).to(Implementation)

without error checking and binding to the default type. This may remove the need for LensKit's @Parameter annotation.

mdekstrand avatar Oct 20 '14 18:10 mdekstrand

I don't recall discussing this previously, but it seems like a pretty straight forward addition. I also think it's valuable, both to simplify LensKit, and because it aids in documenting the intended target types of a qualifier.

lhkbob avatar Oct 20 '14 19:10 lhkbob