Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.2.Final
    • Fix Version/s: 2.0 .Final
    • Component/s: None
    • Labels:
      None

      Description

      Annotation literals are often useful and therefore many projects implement them themselves. For example:

      https://github.com/apache/deltaspike/blob/master/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/DefaultLiteral.java
      https://github.com/weld/core/blob/master/impl/src/main/java/org/jboss/weld/literal/DefaultLiteral.java
      https://github.com/forge/furnace-cdi/blob/master/impl/src/main/java/org/jboss/forge/furnace/container/cdi/util/DefaultLiteral.java
      https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/DefaultLiteral.java

      to name a few.

      It would be nice to provide these within the CDI API, e.g:

      @Target( { TYPE, METHOD, PARAMETER, FIELD })
      @Retention(RUNTIME)
      @Documented
      @Qualifier
      public @interface Default {
      
          @SuppressWarnings("all")
          final class Literal extends AnnotationLiteral<Default> implements Default {
              private Literal() {
              }
          }
      
          final Default INSTANCE = new Literal();
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mkouba Martin Kouba
                  Reporter:
                  jharting Jozef Hartinger
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: