You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by st...@apache.org on 2017/05/24 20:02:05 UTC
svn commit: r1796094 - in
/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise:
event/ inject/ inject/spi/ inject/spi/builder/
Author: struberg
Date: Wed May 24 20:02:05 2017
New Revision: 1796094
URL: http://svn.apache.org/viewvc?rev=1796094&view=rev
Log:
GERONIMO-6553 apply missing classes
figured I missed some classes when applying the patch.
txs to johndament for the patch!
Added:
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java (with props)
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java (with props)
Modified:
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Any.java
geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Default.java
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java Wed May 24 20:02:05 2017
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.event;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Target(PARAMETER)
+@Retention(RUNTIME)
+@Documented
+public @interface ObservesAsync {
+
+ /**
+ * Specifies when this observer is invoked, either if the bean already exists or always, potentially creating the bean
+ * @return
+ */
+ Reception notifyObserver() default Reception.ALWAYS;
+
+}
+
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/event/ObservesAsync.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Any.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Any.java?rev=1796094&r1=1796093&r2=1796094&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Any.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Any.java Wed May 24 20:02:05 2017
@@ -42,11 +42,11 @@ import javax.inject.Qualifier;
@Qualifier
public @interface Any
{
- final class Literal extends AnnotationLiteral<Any> implements Any {
+ final class Literal extends AnnotationLiteral<Any> implements Any {
- public static final Literal INSTANCE = new Literal();
+ public static final Literal INSTANCE = new Literal();
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
}
}
Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Default.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Default.java?rev=1796094&r1=1796093&r2=1796094&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Default.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/Default.java Wed May 24 20:02:05 2017
@@ -42,11 +42,10 @@ import javax.inject.Qualifier;
@Qualifier
public @interface Default
{
- final class Literal extends AnnotationLiteral<Default> implements Default {
+ final class Literal extends AnnotationLiteral<Default> implements Default
+ {
+ public static final Literal INSTANCE = new Literal();
- public static final Literal INSTANCE = new Literal();
-
- private static final long serialVersionUID = 1L;
-
- }
+ private static final long serialVersionUID = 1L;
+ }
}
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java Wed May 24 20:02:05 2017
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi;
+
+public interface Prioritized {
+
+ /**
+ *
+ * @return the priority of this component
+ */
+ int getPriority();
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/Prioritized.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+public interface AnnotatedConstructorConfigurator<T> {
+
+ /**
+ * @return the underlying constructor
+ */
+ AnnotatedConstructor<T> getAnnotated();
+
+ /**
+ * Adds an instance of the given annotation to the constructor.
+ *
+ * @param annotation
+ * @return this
+ */
+ AnnotatedConstructorConfigurator<T> add(Annotation annotation);
+
+ /**
+ * Clears an instance of the given annotation, checking members. Ignores nonbinding annotation members.
+ *
+ * @param annotation
+ * @return this
+ */
+ AnnotatedConstructorConfigurator<T> remove(Annotation annotation);
+
+ /**
+ * Clears all annotations of the given type, regardless of members.
+ *
+ * @param annotationType annotation class to remove
+ * @return this
+ */
+ AnnotatedConstructorConfigurator<T> remove(Class<? extends Annotation> annotationType);
+
+ /**
+ * Clears all annotations
+ *
+ * @return this
+ */
+ AnnotatedConstructorConfigurator<T> removeAll();
+
+ /**
+ *
+ * @return the parameters for the constructor. Need not be mutable.
+ */
+ List<AnnotatedParameterConfigurator<T>> params();
+
+ /**
+ *
+ * @param predicate the filter to apply
+ * @return a stream representation of the underlying
+ */
+ Stream<AnnotatedParameterConfigurator<T>> filterParams(Predicate<AnnotatedParameter<T>> predicate);
+
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedConstructorConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.Annotation;
+
+public interface AnnotatedFieldConfigurator<T> {
+
+ /**
+ *
+ * @return the original {@link AnnotatedField}
+ */
+ AnnotatedField<T> getAnnotated();
+
+ /**
+ * Add an annotation to the field.
+ *
+ * @param annotation to add
+ * @return self
+ */
+ AnnotatedFieldConfigurator<T> add(Annotation annotation);
+
+ /**
+ * Remove annotations with (a) the same type and (b) the same annotation member value for each member which is not
+ * annotated {@link Nonbinding}. The container calls the {@link Object#equals(Object)} method of the annotation member value
+ * to compare values.
+ *
+ * @param annotation to remove
+ * @return self
+ */
+ AnnotatedFieldConfigurator<T> remove(Annotation annotation);
+
+ /**
+ * Removes all annotations with the same type. Annotation members are ignored.
+ *
+ * @param annotationType annotation class to remove
+ * @return self
+ */
+ AnnotatedFieldConfigurator<T> remove(Class<? extends Annotation> annotationType);
+
+ /**
+ * Remove all annotations from the field.
+ *
+ * @return self
+ */
+ AnnotatedFieldConfigurator<T> removeAll();
+
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedFieldConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
+public interface AnnotatedMethodConfigurator<T> {
+
+ /**
+ *
+ * @return the original {@link AnnotatedMethod}
+ */
+ AnnotatedMethod<T> getAnnotated();
+
+ /**
+ * Add an annotation to the field.
+ *
+ * @param annotation to add
+ * @return self
+ */
+ AnnotatedMethodConfigurator<T> add(Annotation annotation);
+
+ /**
+ * Remove annotations with (a) the same type and (b) the same annotation member value for each member which is not
+ * annotated {@link Nonbinding}. The container calls the {@link Object#equals(Object)} method of the annotation member value
+ * to compare values.
+ *
+ * @param annotation to remove
+ * @return self
+ */
+ AnnotatedMethodConfigurator<T> remove(Annotation annotation);
+
+ /**
+ * Removes all annotations with the same type. Annotation members are ignored.
+ *
+ * @param annotationType annotation class to remove
+ * @return self
+ */
+ AnnotatedMethodConfigurator<T> remove(Class<? extends Annotation> annotationType);
+
+ /**
+ * Remove all annotations from the method.
+ *
+ * @return self
+ */
+ AnnotatedMethodConfigurator<T> removeAll();
+
+ /**
+ *
+ * @return an immutable list of {@link AnnotatedParameterConfigurator}s reflecting the
+ * {@link AnnotatedMethod#getParameters()}
+ */
+ List<AnnotatedParameterConfigurator<T>> params();
+
+ /**
+ *
+ * @param predicate Testing the original {@link AnnotatedParameter}
+ * @return a sequence of {@link AnnotatedParameterConfigurator}s matching the given predicate
+ * @see AnnotatedParameterConfigurator#getAnnotated()
+ */
+ Stream<AnnotatedParameterConfigurator<T>> filterParams(Predicate<AnnotatedParameter<T>> predicate);
+
+}
\ No newline at end of file
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedMethodConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import java.lang.annotation.Annotation;
+
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+public interface AnnotatedParameterConfigurator<T> {
+
+ /**
+ *
+ * @return the underlying parameter.
+ */
+ AnnotatedParameter<T> getAnnotated();
+
+ /**
+ * Adds an instance of the given annotation to the parameter.
+ *
+ * @param annotation
+ * @return
+ */
+ AnnotatedParameterConfigurator<T> add(Annotation annotation);
+
+ /**
+ * Removes
+ * @param annotation
+ * @return
+ */
+ AnnotatedParameterConfigurator<T> remove(Annotation annotation);
+
+ /**
+ *
+ * @param annotationType
+ * @return
+ */
+ AnnotatedParameterConfigurator<T> remove(Class<? extends Annotation> annotationType);
+
+ /**
+ * Clears
+ * @return
+ */
+ AnnotatedParameterConfigurator<T> removeAll();
+
+}
\ No newline at end of file
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedParameterConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.Annotation;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
+public interface AnnotatedTypeConfigurator<T> {
+
+ /**
+ *
+ * @return the original {@link AnnotatedType}
+ */
+ AnnotatedType<T> getAnnotated();
+
+ /**
+ * Add an annotation to the field.
+ *
+ * @param annotation to add
+ * @return self
+ */
+ AnnotatedTypeConfigurator<T> add(Annotation annotation);
+
+ /**
+ * Remove annotations with (a) the same type and (b) the same annotation member value for each member which is not
+ * annotated {@link Nonbinding}. The container calls the {@link Object#equals(Object)} method of the annotation member value
+ * to compare values.
+ *
+ * @param annotation to remove
+ * @return self
+ */
+ AnnotatedTypeConfigurator<T> remove(Annotation annotation);
+
+ /**
+ * Removes all annotations with the same type. Annotation members are ignored.
+ *
+ * @param annotationType annotation class to remove
+ * @return self
+ */
+ AnnotatedTypeConfigurator<T> remove(Class<? extends Annotation> annotationType);
+
+ /**
+ * Remove all annotations from the type.
+ *
+ * @return self
+ */
+ AnnotatedTypeConfigurator<T> removeAll();
+
+ /**
+ *
+ * @return an immutable set of {@link AnnotatedMethodConfigurator}s reflecting the {@link AnnotatedType#getMethods()}
+ */
+ Set<AnnotatedMethodConfigurator<? super T>> methods();
+
+ /**
+ * @param predicate Testing the original {@link AnnotatedMethod}
+ * @return a sequence of {@link AnnotatedMethodConfigurator}s matching the given predicate
+ * @see AnnotatedMethodConfigurator#getAnnotated()
+ */
+ default Stream<AnnotatedMethodConfigurator<? super T>> filterMethods(Predicate<AnnotatedMethod<? super T>> predicate) {
+ return methods().stream().filter(c -> predicate.test(c.getAnnotated()));
+ }
+
+ /**
+ *
+ * @return an immutable set of {@link AnnotatedFieldConfigurator}s reflecting the {@link AnnotatedType#getFields()}
+ */
+ Set<AnnotatedFieldConfigurator<? super T>> fields();
+
+ /**
+ * @param predicate Testing the original {@link AnnotatedField}
+ * @return a sequence of {@link AnnotatedFieldConfigurator}s matching the given predicate
+ * @see AnnotatedFieldConfigurator#getAnnotated()
+ */
+ default Stream<AnnotatedFieldConfigurator<? super T>> filterFields(Predicate<AnnotatedField<? super T>> predicate) {
+ return fields().stream().filter(f -> predicate.test(f.getAnnotated()));
+ }
+
+ /**
+ *
+ * @return an immutable set of {@link AnnotatedConstructorConfigurator}s reflecting the
+ * {@link AnnotatedType#getConstructors()}
+ */
+ Set<AnnotatedConstructorConfigurator<T>> constructors();
+
+ /**
+ *
+ * @param predicate Testing the original {@link AnnotatedConstructor}
+ * @return a sequence of {@link AnnotatedConstructorConfigurator}s matching the given predicate
+ * @see AnnotatedConstructorConfigurator#getAnnotated()
+ */
+ default Stream<AnnotatedConstructorConfigurator<T>> filterConstructors(Predicate<AnnotatedConstructor<T>> predicate) {
+ return constructors().stream().filter(c -> predicate.test(c.getAnnotated()));
+ }
+
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/AnnotatedTypeConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.inject.spi.AnnotatedMember;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.util.TypeLiteral;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+public interface BeanAttributesConfigurator<T> {
+ /**
+ * Read the information from the given {@link AnnotatedType}. All relevant information is overwritten.
+ *
+ * @param type AnnotatedType to read information from
+ * @return self
+ */
+ <U extends T> BeanAttributesConfigurator<U> read(AnnotatedType<U> type);
+
+ /**
+ * Read the information from the given {@link AnnotatedMember} (field or method).
+ * All relevant information is overwritten.
+ *
+ * @param member AnnotatedMember to read information from
+ * @return self
+ */
+ <U extends T> BeanAttributesConfigurator<U> read(AnnotatedMember<U> member);
+
+ /**
+ * Read the information from the given bean attributes. All relevant information is overwritten.
+ *
+ * @param beanAttributes beanAttributes to read information from
+ * @return self
+ */
+ BeanAttributesConfigurator<T> read(BeanAttributes<?> beanAttributes);
+
+ /**
+ *
+ * Add a type to the bean types
+ *
+ * @param type the type to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addType(Type type);
+
+ /**
+ *
+ * Add a type to the bean types
+ *
+ * @param typeLiteral the type to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addType(TypeLiteral<?> typeLiteral);
+
+ /**
+ *
+ * Add types to the bean types
+ *
+ * @param types types to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addTypes(Type... types);
+
+ /**
+ *
+ * Add types to the bean types
+ *
+ * @param types types to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addTypes(Set<Type> types);
+
+ /**
+ * Adds an unrestricted set of bean types for the given type as if it represented a bean class of a managed bean.
+ * Illegal bean types are omitted.
+ *
+ * @param type to build the closure from
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addTransitiveTypeClosure(Type type);
+
+ /**
+ *
+ * Replace bean types
+ *
+ * @param types the types of the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> types(Type... types);
+
+ /**
+ *
+ * Replace bean types
+ *
+ * @param types the types of the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> types(Set<Type> types);
+
+ /**
+ *
+ * Replace Bean scope
+ *
+ * @param scope new scope for the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> scope(Class<? extends Annotation> scope);
+
+ /**
+ *
+ * Add a qualifier to the configured bean
+ *
+ * @param qualifier qualifier to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addQualifier(Annotation qualifier);
+
+ /**
+ *
+ * Add qualifiers to the bean.
+ *
+ * @param qualifiers qualifiers to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addQualifiers(Annotation... qualifiers);
+
+ /**
+ *
+ * Add qualifiers to the bean.
+ *
+ * @param qualifiers qualifiers to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addQualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers qualifiers for the build bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> qualifiers(Annotation... qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers for the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> qualifiers(Set<Annotation> qualifiers);
+
+ /**
+ *
+ * Add a stereotype to the configured bean
+ *
+ * @param stereotype stereotype to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addStereotype(Class<? extends Annotation> stereotype);
+
+ /**
+ *
+ * Add stereotypes to the configured bean
+ *
+ * @param stereotypes stereotypes to add
+ * @return self
+ */
+ BeanAttributesConfigurator<T> addStereotypes(Set<Class<? extends Annotation>> stereotypes);
+
+ /**
+ *
+ * Replace stereotypes on the configured bean
+ *
+ * @param stereotypes for the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> stereotypes(Set<Class<? extends Annotation>> stereotypes);
+
+ /**
+ *
+ * Set the name of the configured bean
+ *
+ * @param name name for the configured bean
+ * @return self
+ */
+ BeanAttributesConfigurator<T> name(String name);
+
+ /**
+ *
+ * Change the alternative status of the configured bean.
+ * By default the configured bean is not an alternative.
+ *
+ * @param value value for alternative property
+ * @return self
+ */
+ BeanAttributesConfigurator<T> alternative(boolean value);
+
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanAttributesConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,338 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.PassivationCapable;
+import javax.enterprise.util.TypeLiteral;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+public interface BeanConfigurator<T> {
+
+
+ /**
+ *
+ * Set the class of the configured Bean.
+ * If not set, the extension class is used.
+ *
+ * @param beanClass class of the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> beanClass(Class<?> beanClass);
+
+ /**
+ *
+ * Add an InjectionPoint to the configured bean
+ *
+ * @param injectionPoint the injectionPoint to add
+ * @return self
+ */
+ BeanConfigurator<T> addInjectionPoint(InjectionPoint injectionPoint);
+
+ /**
+ *
+ * Add InjectionPoints to the configured bean
+ *
+ * @param injectionPoints the injectionPoints to add
+ * @return self
+ */
+ BeanConfigurator<T> addInjectionPoints(InjectionPoint... injectionPoints);
+
+ /**
+ *
+ * Add InjectionPoints to the configured bean
+ *
+ * @param injectionPoints the injectionPoints to add
+ * @return self
+ */
+ BeanConfigurator<T> addInjectionPoints(Set<InjectionPoint> injectionPoints);
+
+ /**
+ *
+ * Replace InjectionPoints for the configured bean
+ *
+ * @param injectionPoints the injectionPoints for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> injectionPoints(InjectionPoint... injectionPoints);
+
+ /**
+ *
+ * Replace InjectionPoints for the configured bean
+ *
+ * @param injectionPoints the injectionPoints for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> injectionPoints(Set<InjectionPoint> injectionPoints);
+
+ /**
+ *
+ * Make the configured bean implements {@link PassivationCapable} and its Id for passivation.
+ *
+ *
+ * @param id for
+ * @see PassivationCapable#getId()
+ * @return self
+ */
+ BeanConfigurator<T> id(String id);
+
+ /**
+ *
+ * Set a {@link Function} to create a bean instance from a {@link CreationalContext}
+ *
+ * @param callback the Function to create the instance
+ * @return self
+ */
+ <U extends T> BeanConfigurator<U> createWith(Function<CreationalContext<U>, U> callback);
+
+ /**
+ *
+ * Set a {@link Supplier} to create a bean instance
+ *
+ *
+ * @param callback the Supplier to create the instance
+ * @return self
+ */
+ <U extends T> BeanConfigurator<U> produceWith(Supplier<U> callback);
+
+ /**
+ * Set a {@link Function} to create a bean instance from an {@link Instance}
+ *
+ * @param callback the function to create the instance
+ * @return self
+ */
+ <U extends T> BeanConfigurator<U> produceWith(Function<Instance<Object>, U> callback);
+
+ /**
+ * A shortcut for {@code produceWith(() -> existing} where {@code existing} represents an instance whose lifecycle is not managed by CDI.
+ *
+ * @param instance use as produced instance for the configured bean
+ * @return self
+ */
+ <U extends T> BeanConfigurator<U> producing(U instance);
+
+ /**
+ *
+ * Set a {@link BiConsumer} to destroy a bean instance from a {@link CreationalContext}.
+ * If no destroy callback is specified, a NOOP dispose callback is automatically set.
+ *
+ * @param callback the BiConsumer to destroy the instance
+ * @return self
+ */
+ BeanConfigurator<T> destroyWith(BiConsumer<T, CreationalContext<T>> callback);
+
+ /**
+ *
+ * Set a {@link Consumer} to destroy a bean instance.
+ * If no dispose callback is specified, a NOOP dispose callback is automatically set.
+ *
+ * @param callback the Consumer to dispose the instance
+ * @return self
+ */
+ BeanConfigurator<T> disposeWith(Consumer<T> callback);
+
+ /**
+ * Read the information from the given annotated type. All relevant information is overwritten.
+ *
+ * @param type class to read information from
+ * @return self
+ */
+ <U extends T> BeanConfigurator<U> read(AnnotatedType<U> type);
+
+ /**
+ * Read the information from the given bean attributes. All relevant information is overwritten.
+ *
+ * @param beanAttributes beanAttributes to read information from
+ * @return self
+ */
+ BeanConfigurator<T> read(BeanAttributes<?> beanAttributes);
+
+ /**
+ *
+ * Add a type to the bean types
+ *
+ * @param type the type to add
+ * @return self
+ */
+ BeanConfigurator<T> addType(Type type);
+
+ /**
+ *
+ * Add a type to the bean types
+ *
+ * @param typeLiteral the type to add
+ * @return self
+ */
+ BeanConfigurator<T> addType(TypeLiteral<?> typeLiteral);
+
+ /**
+ *
+ * Add types to the bean types
+ *
+ * @param types types to add
+ * @return self
+ */
+ BeanConfigurator<T> addTypes(Type... types);
+
+ /**
+ *
+ * Add types to the bean types
+ *
+ * @param types types to add
+ * @return self
+ */
+ BeanConfigurator<T> addTypes(Set<Type> types);
+
+ /**
+ * Adds an unrestricted set of bean types for the given type as if it represented a bean class of a managed bean.
+ * Illegal bean types are omitted.
+ *
+ * @param type to build the closure from
+ * @return self
+ */
+ BeanConfigurator<T> addTransitiveTypeClosure(Type type);
+
+ /**
+ *
+ * Replace bean types
+ *
+ * @param types the types of the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> types(Type... types);
+
+ /**
+ *
+ * Replace bean types
+ *
+ * @param types the types of the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> types(Set<Type> types);
+
+ /**
+ *
+ * Replace Bean scope
+ *
+ * @param scope new scope for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> scope(Class<? extends Annotation> scope);
+
+ /**
+ *
+ * Add a qualifier to the configured bean
+ *
+ * @param qualifier qualifier to add
+ * @return self
+ */
+ BeanConfigurator<T> addQualifier(Annotation qualifier);
+
+ /**
+ *
+ * Add qualifiers to the bean.
+ *
+ * @param qualifiers qualifiers to add
+ * @return self
+ */
+ BeanConfigurator<T> addQualifiers(Annotation... qualifiers);
+
+ /**
+ *
+ * Add qualifiers to the bean.
+ *
+ * @param qualifiers qualifiers to add
+ * @return self
+ */
+ BeanConfigurator<T> addQualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers qualifiers for the build bean
+ * @return self
+ */
+ BeanConfigurator<T> qualifiers(Annotation... qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> qualifiers(Set<Annotation> qualifiers);
+
+ /**
+ *
+ * Add a stereotype to the configured bean
+ *
+ * @param stereotype stereotype to add
+ * @return self
+ */
+ BeanConfigurator<T> addStereotype(Class<? extends Annotation> stereotype);
+
+ /**
+ *
+ * Add stereotypes to the configured bean
+ *
+ * @param stereotypes stereotypes to add
+ * @return self
+ */
+ BeanConfigurator<T> addStereotypes(Set<Class<? extends Annotation>> stereotypes);
+
+ /**
+ *
+ * Replace stereotypes on the configured bean
+ *
+ * @param stereotypes for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> stereotypes(Set<Class<? extends Annotation>> stereotypes);
+
+ /**
+ *
+ * Set the name of the configured bean
+ *
+ * @param name name for the configured bean
+ * @return self
+ */
+ BeanConfigurator<T> name(String name);
+
+ /**
+ *
+ * Change the alternative status of the configured bean.
+ * By default the configured bean is not an alternative.
+ *
+ * @param value value for alternative property
+ * @return self
+ */
+ BeanConfigurator<T> alternative(boolean value);
+
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/BeanConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionPoint;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Parameter;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+public interface InjectionPointConfigurator {
+
+ /**
+ * Read the InjectionPoint information from the given {@link Field}.
+ * All relevant information is overwritten.
+ *
+ * @param field defining the InjectionPoint.
+ * @return self
+ */
+ InjectionPointConfigurator read(Field field);
+
+ /**
+ * Read the InjectionPoint information from the given {@link Parameter}.
+ * All relevant information is overwritten.
+ *
+ * @param param the parameter defining the InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator read(Parameter param);
+
+ /**
+ * Read the InjectionPoint information from the given {@link AnnotatedField}.
+ * All relevant information is overwritten.
+ *
+ * @param field defining the InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator read(AnnotatedField<?> field);
+
+ /**
+ * Read the InjectionPoint information from the given {@link AnnotatedParameter}.
+ * All relevant information is overwritten.
+ *
+ * @param param defining the InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator read(AnnotatedParameter<?> param);
+
+ /**
+ * Read the InjectionPoint information from the given {@link InjectionPoint}.
+ * All relevant information is overwritten.
+ *
+ * @param injectionPoint the InjectionPoint to get information from
+ * @return self
+ */
+ InjectionPointConfigurator read(InjectionPoint injectionPoint);
+
+ /**
+ * Set the required {@link Type} (that will be used during typesafe resolution)
+ * of the InjectionPoint to build.
+ *
+ * @param requiredType for the InjectionPoint to build
+ * @return self
+ */
+ InjectionPointConfigurator type(Type requiredType);
+
+ /**
+ *
+ * Add the qualifier to the InjectionPoint to build
+ *
+ * @param qualifier the qualifier to add
+ * @return self
+ */
+ InjectionPointConfigurator addQualifier(Annotation qualifier);
+
+ /**
+ *
+ * Add all the qualifiers to the InjectionPoint to build
+ *
+ * @param qualifiers a varargs or array of qualifiers to add
+ * @return self
+ */
+ InjectionPointConfigurator addQualifiers(Annotation... qualifiers);
+
+ /**
+ *
+ * Add all the qualifiers to the InjectionPoint to build
+ *
+ * @param qualifiers a Set of qualifiers to add
+ * @return self
+ */
+ InjectionPointConfigurator addQualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers a varargs or array of qualifiers to replace to existing ones
+ * @return self
+ */
+ InjectionPointConfigurator qualifiers(Annotation... qualifiers);
+
+ /**
+ * Replace all qualifiers.
+ *
+ * @param qualifiers a Set of qualifiers to replace to existing ones
+ * @return self
+ */
+ InjectionPointConfigurator qualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Set the {@link javax.enterprise.inject.spi.Bean} object representing the bean that defines the injection point. If the
+ * injection point does not belong to a bean, return a null value.
+ *
+ * @param bean the bean for this configured InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator bean(Bean<?> bean);
+
+ /**
+ *
+ * Change the delegate status of the built InjectionPoint.
+ * By default the InjectionPoint is not a delegate one.
+ *
+ * @param delegate boolean to define or undefine the delegate nature of the configured InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator delegate(boolean delegate);
+
+ /**
+ *
+ * Change the transient status of the built InjectionPoint.
+ * By default the InjectionPoint is not transient.
+ *
+ * @param trans boolean to define or undefine the transient nature of the configured InjectionPoint
+ * @return self
+ */
+ InjectionPointConfigurator transientField(boolean trans);
+}
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/InjectionPointConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java?rev=1796094&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java (added)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java Wed May 24 20:02:05 2017
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.enterprise.inject.spi.builder;
+
+import javax.enterprise.event.Reception;
+import javax.enterprise.event.TransactionPhase;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.EventMetadata;
+import javax.enterprise.inject.spi.ObserverMethod;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.Set;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+
+public interface ObserverMethodConfigurator<T> {
+
+ /**
+ * Read observer meta data from a existing {@link java.lang.reflect.Method}
+ *
+ * @param method to read meta data from
+ * @return self
+ */
+ ObserverMethodConfigurator<T> read(Method method);
+
+ /**
+ * Read observer meta data from a existing {@link AnnotatedMethod}
+ *
+ * @param method to read meta data from
+ * @return self
+ */
+ ObserverMethodConfigurator<T> read(AnnotatedMethod<?> method);
+
+ /**
+ * Read observer meta data from a existing ObserverMethod
+ *
+ * @param method to read meta data from
+ * @return self
+ */
+ ObserverMethodConfigurator<T> read(ObserverMethod<T> method);
+
+ /**
+ * Set the class of the Bean containing this observer.
+ * If not set, the extension class is used.
+ *
+ * @param type the bean class containing this configurator.
+ * @return self
+ */
+ ObserverMethodConfigurator<T> beanClass(Class<?> type);
+
+ /**
+ * Set the type of the observed event
+ *
+ * @param type of the observed event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> observedType(Type type);
+
+ /**
+ * Add the qualifier to the observed event
+ *
+ * @param qualifier to add to event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> addQualifier(Annotation qualifier);
+
+ /**
+ * Add all the qualifiers to the Observed event
+ *
+ * @param qualifiers to add to event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> addQualifiers(Annotation... qualifiers);
+
+ /**
+ * Add all the qualifiers to the Observed event
+ *
+ * @param qualifiers to add to event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> addQualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Replace all qualifiers on the Observed event.
+ *
+ * @param qualifiers to put on event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> qualifiers(Annotation... qualifiers);
+
+ /**
+ * Replace all qualifiers on the Observed event.
+ *
+ * @param qualifiers to put on event
+ * @return self
+ */
+ ObserverMethodConfigurator<T> qualifiers(Set<Annotation> qualifiers);
+
+ /**
+ * Set the {@link Reception} mode for the observer to build
+ *
+ * @param reception reception type
+ * @return self
+ */
+ ObserverMethodConfigurator<T> reception(Reception reception);
+
+ /**
+ * Set the {@link TransactionPhase} for the observer to build
+ *
+ * @param transactionPhase phase for the observer
+ * @return self
+ */
+ ObserverMethodConfigurator<T> transactionPhase(TransactionPhase transactionPhase);
+
+ /**
+ * Set the priority for the observer to build
+ *
+ * @param priority priority of the observer
+ * @return self
+ */
+ ObserverMethodConfigurator<T> priority(int priority);
+
+ /**
+ * Define Consumer to call when event is notified
+ *
+ * @param callback to call for the event notification
+ * @return self
+ */
+ ObserverMethodConfigurator<T> notifyWith(Consumer<T> callback);
+
+ /**
+ * Defines a BiConsumer to call when event is notified
+ *
+ * @param callback a BiConsumer taking an event type and an EventMetadata as type parameters
+ * @return self
+ */
+ ObserverMethodConfigurator<T> notifyWith(BiConsumer<T, EventMetadata> callback);
+
+ /**
+ * Allows modification of the asynchronous status of the observer to build.
+ *
+ * @param async async status
+ * @return self
+ */
+ ObserverMethodConfigurator<T> async(boolean async);
+}
+
Propchange: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/builder/ObserverMethodConfigurator.java
------------------------------------------------------------------------------
svn:eol-style = native