-
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.
Allow to exclude JAX-RS classes with annotations
Co-authored-by: Georgios Andrianakis <[email protected]>
- Loading branch information
Showing
13 changed files
with
744 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
.../deployment/src/main/java/io/quarkus/arc/deployment/EagerBuildTimeConditionBuildItem.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 EagerBuildTimeConditionBuildItem extends MultiBuildItem { | ||
|
||
private final AnnotationTarget target; | ||
private final boolean enabled; | ||
|
||
public EagerBuildTimeConditionBuildItem(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.