forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Duplicating EndpointValidationPredicatesBuildItem for avoiding restea…
…sy spi common module
- Loading branch information
1 parent
e870511
commit b54a4f2
Showing
12 changed files
with
51 additions
and
68 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
2 changes: 1 addition & 1 deletion
2
...ndpointValidationPredicatesBuildItem.java → ...ndpointValidationPredicatesBuildItem.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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
33 changes: 33 additions & 0 deletions
33
...io/quarkus/resteasy/reactive/common/deployment/EndpointValidationPredicatesBuildItem.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,33 @@ | ||
package io.quarkus.resteasy.reactive.common.deployment; | ||
|
||
import java.util.function.Predicate; | ||
|
||
import org.jboss.jandex.ClassInfo; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* A build item that provides a {@link Predicate} to detect and validate classes defining REST endpoints. | ||
* <p> | ||
* This can include resources in RESTEasy or controllers in the Spring ecosystem. | ||
* It acts as a Service Provider Interface (SPI) to allow customization of the validation logic for endpoint detection, | ||
* enabling integration with various frameworks or specific application needs. | ||
* </p> | ||
* | ||
* <p> | ||
* The {@link Predicate} evaluates {@link ClassInfo} instances to determine whether a class defines a REST endpoint | ||
* according to the provided logic. | ||
* </p> | ||
*/ | ||
public final class EndpointValidationPredicatesBuildItem extends MultiBuildItem { | ||
|
||
private final Predicate<ClassInfo> predicate; | ||
|
||
public EndpointValidationPredicatesBuildItem(Predicate<ClassInfo> predicate) { | ||
this.predicate = predicate; | ||
} | ||
|
||
public Predicate<ClassInfo> getPredicate() { | ||
return predicate; | ||
} | ||
} |
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
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