geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1796103 - in /geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise: context/ inject/
Date Wed, 24 May 2017 21:33:47 GMT
Author: struberg
Date: Wed May 24 21:33:46 2017
New Revision: 1796103

URL: http://svn.apache.org/viewvc?rev=1796103&view=rev
Log:
GERONIMO-6553 add tons of Literals

Modified:
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ApplicationScoped.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ConversationScoped.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Dependent.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Destroyed.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Initialized.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/RequestScoped.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/SessionScoped.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Alternative.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/New.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Specializes.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/TransientReference.java
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Typed.java

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ApplicationScoped.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ApplicationScoped.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ApplicationScoped.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ApplicationScoped.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,7 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Inherited;
@@ -40,5 +41,10 @@ import java.lang.annotation.Target;
 @Documented
 public @interface ApplicationScoped
 {
+    final class Literal extends AnnotationLiteral<ApplicationScoped> implements ApplicationScoped
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ConversationScoped.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ConversationScoped.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ConversationScoped.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/ConversationScoped.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,7 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Inherited;
@@ -37,5 +38,10 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface ConversationScoped
 {
+    final class Literal extends AnnotationLiteral<ConversationScoped> implements ConversationScoped
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Dependent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Dependent.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Dependent.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Dependent.java
Wed May 24 21:33:46 2017
@@ -25,6 +25,7 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Scope;
 
 /**
@@ -56,5 +57,10 @@ import javax.inject.Scope;
 @Documented
 public @interface Dependent
 {
+    final class Literal extends AnnotationLiteral<Dependent> implements Dependent
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Destroyed.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Destroyed.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Destroyed.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Destroyed.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,7 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Qualifier;
 import java.lang.annotation.Annotation;
 import java.lang.annotation.Documented;
@@ -53,4 +54,32 @@ public @interface Destroyed
      * @return the Scope annotation this is for.
      */
     Class<? extends Annotation> value();
+
+    final class Literal extends AnnotationLiteral<Destroyed> implements Destroyed
+    {
+        public static final Literal APPLICATION = of(ApplicationScoped.class);
+        public static final Literal SESSION = of(SessionScoped.class);
+        public static final Literal CONVERSATION = of(ConversationScoped.class);
+        public static final Literal REQUEST = of(RequestScoped.class);
+
+        private static final long serialVersionUID = 1L;
+
+        private final Class<? extends Annotation> value;
+
+        public static Literal of(Class<? extends Annotation> value)
+        {
+            return new Literal(value);
+        }
+
+        private Literal(Class<? extends Annotation> value)
+        {
+            this.value = value;
+        }
+
+        @Override
+        public Class<? extends Annotation> value()
+        {
+            return value;
+        }
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Initialized.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Initialized.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Initialized.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/Initialized.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,7 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Qualifier;
 import java.lang.annotation.Annotation;
 import java.lang.annotation.Documented;
@@ -53,4 +54,32 @@ public @interface Initialized
      * @return the Scope annotation this is for.
      */
     Class<? extends Annotation> value();
+
+    final class Literal extends AnnotationLiteral<Initialized> implements Initialized
+    {
+        public static final Literal APPLICATION = of(ApplicationScoped.class);
+        public static final Literal SESSION = of(SessionScoped.class);
+        public static final Literal CONVERSATION = of(ConversationScoped.class);
+        public static final Literal REQUEST = of(RequestScoped.class);
+
+        private static final long serialVersionUID = 1L;
+
+        private final Class<? extends Annotation> value;
+
+        public static Literal of(Class<? extends Annotation> value)
+        {
+            return new Literal(value);
+        }
+
+        private Literal(Class<? extends Annotation> value)
+        {
+            this.value = value;
+        }
+
+        @Override
+        public Class<? extends Annotation> value()
+        {
+            return value;
+        }
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/RequestScoped.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/RequestScoped.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/RequestScoped.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/RequestScoped.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,8 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
+
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.ElementType.FIELD;
@@ -45,5 +47,10 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface RequestScoped
 {
+    final class Literal extends AnnotationLiteral<RequestScoped> implements RequestScoped
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/SessionScoped.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/SessionScoped.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/SessionScoped.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/context/SessionScoped.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,8 @@
  */
 package javax.enterprise.context;
 
+import javax.enterprise.util.AnnotationLiteral;
+
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.ElementType.TYPE;
@@ -40,5 +42,10 @@ import java.lang.annotation.Target;
 @Inherited
 public @interface SessionScoped
 {
+    final class Literal extends AnnotationLiteral<SessionScoped> implements SessionScoped
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Alternative.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Alternative.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Alternative.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Alternative.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,8 @@
  */
 package javax.enterprise.inject;
 
+import javax.enterprise.util.AnnotationLiteral;
+
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.ElementType.METHOD;
@@ -32,5 +34,10 @@ import java.lang.annotation.Target;
 @Documented
 public @interface Alternative
 {
+    final class Literal extends AnnotationLiteral<Alternative> implements Alternative
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/New.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/New.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/New.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/New.java
Wed May 24 21:33:46 2017
@@ -28,6 +28,7 @@ import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
+import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Qualifier;
 
 @Target( { FIELD, PARAMETER, METHOD, TYPE})
@@ -69,4 +70,29 @@ public @interface New
      * @return the class of the bean which should be injected
      */
     Class<?> value() default New.class;
+
+    final class Literal extends AnnotationLiteral<New> implements New
+    {
+        private static final long serialVersionUID = 1L;
+
+        private final Class<?> value;
+
+
+        public static Literal of(Class<?> value)
+        {
+            return new Literal(value);
+        }
+
+        private Literal(Class<?> value)
+        {
+            this.value = value;
+        }
+
+        @Override
+        public Class<?> value()
+        {
+            return value;
+        }
+    }
+
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Specializes.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Specializes.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Specializes.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Specializes.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,8 @@
  */
 package javax.enterprise.inject;
 
+import javax.enterprise.util.AnnotationLiteral;
+
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -31,5 +33,10 @@ import java.lang.annotation.Target;
 @Documented
 public @interface Specializes
 {
+    final class Literal extends AnnotationLiteral<Specializes> implements Specializes
+    {
+        public static final Literal INSTANCE = new Literal();
 
+        private static final long serialVersionUID = 1L;
+    }
 }

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/TransientReference.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/TransientReference.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/TransientReference.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/TransientReference.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,8 @@
  */
 package javax.enterprise.inject;
 
+import javax.enterprise.util.AnnotationLiteral;
+
 import static java.lang.annotation.ElementType.PARAMETER;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
@@ -46,4 +48,11 @@ import java.lang.annotation.Target;
 @Documented
 public @interface TransientReference
 {
+    final class Literal extends AnnotationLiteral<TransientReference> implements TransientReference
+    {
+        public static final Literal INSTANCE = new Literal();
+
+        private static final long serialVersionUID = 1L;
+    }
+
 }
\ No newline at end of file

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Typed.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Typed.java?rev=1796103&r1=1796102&r2=1796103&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Typed.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Typed.java
Wed May 24 21:33:46 2017
@@ -18,6 +18,7 @@
  */
 package javax.enterprise.inject;
 
+import javax.enterprise.util.AnnotationLiteral;
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -36,6 +37,30 @@ import java.lang.annotation.Target;
 public @interface Typed
 {
 
-   Class<?>[] value() default {};
+    Class<?>[] value() default {};
+
+    final class Literal extends AnnotationLiteral<Typed> implements Typed
+    {
+        private static final long serialVersionUID = 1L;
+
+        private final Class<?>[] value;
+
+
+        public static Literal of(Class<?>[] value)
+        {
+            return new Literal(value);
+        }
+
+        private Literal(Class<?>[] value)
+        {
+            this.value = value;
+        }
+
+        @Override
+        public Class<?>[] value()
+        {
+            return value;
+        }
+    }
 
 }



Mime
View raw message