-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditions to optional classes to register
- Loading branch information
Showing
4 changed files
with
80 additions
and
19 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...n/java/io/quarkus/deployment/builditem/nativeimage/ReflectiveClassConditionBuildItem.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,29 @@ | ||
package io.quarkus.deployment.builditem.nativeimage; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* Used to define a condition to register a class for reflection in native mode only when a specific type is reachable | ||
*/ | ||
public final class ReflectiveClassConditionBuildItem extends MultiBuildItem { | ||
|
||
private final String className; | ||
private final String typeReachable; | ||
|
||
public ReflectiveClassConditionBuildItem(Class<?> className, String typeReachable) { | ||
this(className.getName(), typeReachable); | ||
} | ||
|
||
public ReflectiveClassConditionBuildItem(String className, String typeReachable) { | ||
this.className = className; | ||
this.typeReachable = typeReachable; | ||
} | ||
|
||
public String getClassName() { | ||
return className; | ||
} | ||
|
||
public String getTypeReachable() { | ||
return typeReachable; | ||
} | ||
} |
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