| 1 |
/* |
| 2 |
* Copyright (c) 2021 Red Hat and others |
| 3 |
* |
| 4 |
* This program and the accompanying materials are made available under the |
| 5 |
* Apache Software License 2.0 which is available at: |
| 6 |
* https://www.apache.org/licenses/LICENSE-2.0. |
| 7 |
* |
| 8 |
* SPDX-License-Identifier: Apache-2.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
package jakarta.enterprise.inject.build.compatible.spi; |
| 12 |
|
| 13 |
import jakarta.enterprise.lang.model.AnnotationInfo; |
| 14 |
import jakarta.enterprise.lang.model.declarations.DeclarationInfo; |
| 15 |
import jakarta.enterprise.lang.model.types.Type; |
| 16 |
import java.util.Collection; |
| 17 |
|
| 18 |
/** |
| 19 |
* An injection point defined on some bean. Injection points may be fields |
| 20 |
* or method parameters. |
| 21 |
* |
| 22 |
* @since 4.0 |
| 23 |
*/ |
| 24 |
public interface InjectionPointInfo { |
| 25 |
/** |
| 26 |
* Returns the {@link Type type} of this injection point. |
| 27 |
* |
| 28 |
* @return the type of this injection point, never {@code null} |
| 29 |
*/ |
| 30 |
Type type(); |
| 31 |
|
| 32 |
/** |
| 33 |
* Returns a collection of qualifiers declared on this injection point, represented as {@link AnnotationInfo}. |
| 34 |
* |
| 35 |
* @return collection of qualifiers, never {@code null} |
| 36 |
*/ |
| 37 |
Collection<AnnotationInfo> qualifiers(); |
| 38 |
|
| 39 |
/** |
| 40 |
* Returns the declaration of this injection point. |
| 41 |
* That is a {@link jakarta.enterprise.lang.model.declarations.FieldInfo FieldInfo} for field injection, |
| 42 |
* or {@link jakarta.enterprise.lang.model.declarations.ParameterInfo ParameterInfo} for: |
| 43 |
* <ul> |
| 44 |
* <li>constructor injection,</li> |
| 45 |
* <li>initializer method,</li> |
| 46 |
* <li>disposer method,</li> |
| 47 |
* <li>producer method,</li> |
| 48 |
* <li>observer method.</li> |
| 49 |
* </ul> |
| 50 |
* |
| 51 |
* @return the declaration of this injection point, never {@code null} |
| 52 |
*/ |
| 53 |
DeclarationInfo declaration(); |
| 54 |
} |