-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15215 from essobedo/15214/exclude-jaxrs-classes
Allow to exclude JAX-RS classes with annotations
- Loading branch information
Showing
13 changed files
with
746 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...src/main/java/io/quarkus/arc/deployment/PreAdditionalBeanBuildTimeConditionBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.quarkus.arc.deployment; | ||
|
||
import org.jboss.jandex.AnnotationTarget; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* A type of build item that is similar to {@link BuildTimeConditionBuildItem} but evaluated before | ||
* processing the {@link AdditionalBeanBuildItem} in order to filter the beans thanks to build time conditions | ||
* before actually adding them with a {@link AdditionalBeanBuildItem}. | ||
* | ||
* @see io.quarkus.arc.deployment.BuildTimeConditionBuildItem | ||
* @see io.quarkus.arc.deployment.AdditionalBeanBuildItem | ||
*/ | ||
public final class PreAdditionalBeanBuildTimeConditionBuildItem extends MultiBuildItem { | ||
|
||
private final AnnotationTarget target; | ||
private final boolean enabled; | ||
|
||
public PreAdditionalBeanBuildTimeConditionBuildItem(AnnotationTarget target, boolean enabled) { | ||
switch (target.kind()) { | ||
case CLASS: | ||
case METHOD: | ||
case FIELD: | ||
this.target = target; | ||
break; | ||
default: | ||
throw new IllegalArgumentException("'target' can only be a class, a field or a method"); | ||
} | ||
this.enabled = enabled; | ||
} | ||
|
||
public AnnotationTarget getTarget() { | ||
return target; | ||
} | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.