diff --git a/tests/src/main/java/org/treblereel/injection/qualifiers/QualifierOne.java b/annotations/src/main/java/io/crysknife/annotation/CircularDependency.java similarity index 68% rename from tests/src/main/java/org/treblereel/injection/qualifiers/QualifierOne.java rename to annotations/src/main/java/io/crysknife/annotation/CircularDependency.java index 499d9c94..97ed56b2 100644 --- a/tests/src/main/java/org/treblereel/injection/qualifiers/QualifierOne.java +++ b/annotations/src/main/java/io/crysknife/annotation/CircularDependency.java @@ -1,5 +1,5 @@ /* - * Copyright © 2020 Treblereel + * Copyright (C) 2021 * * Licensed 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 @@ -12,23 +12,18 @@ * the License. */ -package org.treblereel.injection.qualifiers; +package io.crysknife.annotation; -import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import javax.inject.Qualifier; - /** - * @author Dmitrii Tikhomirov Created by treblereel 4/13/19 + * @author Dmitrii Tikhomirov Created by treblereel 9/30/21 TODO */ -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) -@Documented -@Qualifier -public @interface QualifierOne { +@Target(ElementType.TYPE) +public @interface CircularDependency { } diff --git a/annotations/src/main/java/javax/enterprise/inject/Any.java b/annotations/src/main/java/javax/enterprise/inject/Any.java new file mode 100644 index 00000000..5a4568a2 --- /dev/null +++ b/annotations/src/main/java/javax/enterprise/inject/Any.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2010 Red Hat, Inc. and/or its affiliates. + * + * Licensed 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; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import javax.inject.Qualifier; + +/** + *
+ * The built-in qualifier type. + *
+ * + *+ * Every bean has the qualifier @Any, even if it does not explicitly declare this + * qualifier, except for the special {@link javax.enterprise.inject.New @New qualified beans}. + *
+ * + *+ * Every event has the qualifier @Any, even if it was raised without explicitly + * declaration of this qualifier. + *
+ * + *+ * The @Any qualifier allows an injection point to refer to all beans or all events of + * a certain bean type. + *
+ * + *+ * @Inject + * @Any + * Instance<PaymentProcessor> anyPaymentProcessor; + *+ * + *
+ * @Inject + * @Any + * Event<User> anyUserEvent; + *+ * + *
+ * @Inject + * @Delegate + * @Any + * Logger logger; + *+ * + * @author Gavin King + * @author David Allen + */ + +@Qualifier +@Retention(RUNTIME) +@Target({TYPE, METHOD, FIELD, PARAMETER}) +@Documented +public @interface Any { + +} diff --git a/annotations/src/main/java/javax/enterprise/inject/Specializes.java b/annotations/src/main/java/javax/enterprise/inject/Specializes.java new file mode 100644 index 00000000..b2559966 --- /dev/null +++ b/annotations/src/main/java/javax/enterprise/inject/Specializes.java @@ -0,0 +1,71 @@ +/* + * JBoss, Home of Professional Open Source Copyright 2010, Red Hat, Inc., and individual + * contributors by the @authors tag. See the copyright.txt in the distribution for a full listing of + * individual contributors. + * + * Licensed 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; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + *
+ * Indicates that a bean directly specializes another bean. May be applied to a bean class or + * producer method. + *
+ * + *+ * If a bean directly specializes a second bean, it inherits: + *
+ * + *+ * If the second bean has a name, the bean may not declare a name using {@link javax.inject.Named + * @Named}. Furthermore, the bean must have all the bean types of the second bean. + *
+ * + *+ * If a bean is specialized by any enabled bean, the first bean is disabled. + *
+ * + * @author Gavin King + * @author Pete Muir + */ + +@Target({TYPE, METHOD}) +@Retention(RUNTIME) +@Documented +public @interface Specializes { + +} diff --git a/tests/src/main/java/org/treblereel/produces/qualifier/QualifierOne.java b/annotations/src/main/java/javax/enterprise/inject/Typed.java similarity index 72% rename from tests/src/main/java/org/treblereel/produces/qualifier/QualifierOne.java rename to annotations/src/main/java/javax/enterprise/inject/Typed.java index 63b93c8e..8bff1d17 100644 --- a/tests/src/main/java/org/treblereel/produces/qualifier/QualifierOne.java +++ b/annotations/src/main/java/javax/enterprise/inject/Typed.java @@ -1,5 +1,5 @@ /* - * Copyright © 2020 Treblereel + * Copyright (C) 2009 The JSR-330 Expert Group * * Licensed 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 @@ -12,7 +12,7 @@ * the License. */ -package org.treblereel.produces.qualifier; +package javax.enterprise.inject; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -20,15 +20,10 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import javax.inject.Qualifier; - -/** - * @author Dmitrii Tikhomirov Created by treblereel 4/13/19 - */ -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) +@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented -@Qualifier -public @interface QualifierOne { +public @interface Typed { + Class>[] value() default {}; } diff --git a/bom/pom.xml b/bom/pom.xml new file mode 100644 index 00000000..b9429a23 --- /dev/null +++ b/bom/pom.xml @@ -0,0 +1,127 @@ + +