Debian Codegraph @

api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/AnnotationBuilderFactory.java

raw
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.declarations.ClassInfo;
14
15 import java.lang.annotation.Annotation;
16
17 /**
18 * Supports instantiating {@link AnnotationBuilder}.
19 * Should not be called directly by users; the static methods on {@link AnnotationBuilder} are preferred.
20 *
21 * @since 4.0
22 */
23 public interface AnnotationBuilderFactory {
24 /**
25 * Returns a new {@link AnnotationBuilder} for given annotation type.
26 *
27 * @param annotationType the annotation type
28 * @return a new {@link AnnotationBuilder}
29 */
30 AnnotationBuilder create(Class<? extends Annotation> annotationType);
31
32 /**
33 * Returns a new {@link AnnotationBuilder} for given annotation type.
34 *
35 * @param annotationType the annotation type
36 * @return a new {@link AnnotationBuilder}
37 */
38 AnnotationBuilder create(ClassInfo annotationType);
39 }