Skip to content

Support for TYPE_USE for custom @Qualifier annotations and for the @Named one #1910

@vlsi

Description

@vlsi

Currently, @Named does not support TYPE_USE target, so the following code does not compile:

...Provider<@Named("app.config") Properties>...

It would be great if Guice supported TYPE_USE for @Qualifiers as the qualifier seems to belong to a type rather than method/field/class.

At the same time, it might be worth recommending TYPE_USE as the only target for @Qualifier implementations. Of course, refactoring the current @Named might change a lot, so I would like to support TYPE_USE, and decide with @Named later.

See:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions