use of io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem in project camel-quarkus by apache.
the class HazelcastProcessor method registerTypeHierarchy.
private static void registerTypeHierarchy(BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyClass, BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarnings, Class<?>... classNames) {
for (Class<?> klass : classNames) {
DotName simpleName = DotName.createSimple(klass.getName());
reflectiveHierarchyClass.produce(new ReflectiveHierarchyBuildItem.Builder().type(Type.create(simpleName, Type.Kind.CLASS)).build());
ignoreWarnings.produce(new ReflectiveHierarchyIgnoreWarningBuildItem(simpleName));
}
}
use of io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem in project kogito-runtimes by kiegroup.
the class ProcessesAssetsProcessor method addInnerClasses.
private void addInnerClasses(Class<?> superClass, BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyClass) {
DotName dotName = DotName.createSimple(superClass.getName());
Type type = Type.create(dotName, Type.Kind.CLASS);
reflectiveHierarchyClass.produce(new ReflectiveHierarchyBuildItem.Builder().type(type).build());
asList(superClass.getDeclaredClasses()).forEach(c -> {
addInnerClasses(c, reflectiveHierarchyClass);
});
}
use of io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem in project quarkus-github-app by quarkiverse.
the class GitHubAppProcessor method registerForReflection.
@BuildStep
void registerForReflection(CombinedIndexBuildItem combinedIndex, BuildProducer<ReflectiveClassBuildItem> reflectiveClasses, BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchies) {
// Types used for config files
for (AnnotationInstance configFileAnnotationInstance : combinedIndex.getIndex().getAnnotations(CONFIG_FILE)) {
MethodParameterInfo methodParameter = configFileAnnotationInstance.target().asMethodParameter();
short parameterPosition = methodParameter.position();
Type parameterType = methodParameter.method().parameters().get(parameterPosition);
reflectiveHierarchies.produce(new ReflectiveHierarchyBuildItem.Builder().type(parameterType).index(combinedIndex.getIndex()).source(GitHubAppProcessor.class.getSimpleName() + " > " + methodParameter.method().declaringClass() + "#" + methodParameter.method()).build());
}
// Caffeine
reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, "com.github.benmanes.caffeine.cache.SSMSA", "com.github.benmanes.caffeine.cache.PSWMS"));
}
use of io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem in project quarkus-hazelcast-client by hazelcast.
the class HazelcastClientProcessor method registerTypeHierarchy.
private static void registerTypeHierarchy(BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyClass, BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarnings, Class<?>... classNames) {
for (Class<?> klass : classNames) {
DotName simpleName = DotName.createSimple(klass.getName());
reflectiveHierarchyClass.produce(new ReflectiveHierarchyBuildItem.Builder().type(Type.create(simpleName, Type.Kind.CLASS)).build());
ignoreWarnings.produce(new ReflectiveHierarchyIgnoreWarningBuildItem(simpleName));
}
}
use of io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem in project quarkus-github-action by quarkiverse.
the class GitHubActionProcessor method registerForReflection.
@BuildStep
void registerForReflection(CombinedIndexBuildItem combinedIndex, BuildProducer<ReflectiveClassBuildItem> reflectiveClasses, BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchies) {
// Types used for config files
for (AnnotationInstance configFileAnnotationInstance : combinedIndex.getIndex().getAnnotations(CONFIG_FILE)) {
MethodParameterInfo methodParameter = configFileAnnotationInstance.target().asMethodParameter();
short parameterPosition = methodParameter.position();
Type parameterType = methodParameter.method().parameters().get(parameterPosition);
reflectiveHierarchies.produce(new ReflectiveHierarchyBuildItem.Builder().type(parameterType).index(combinedIndex.getIndex()).source(GitHubActionProcessor.class.getSimpleName() + " > " + methodParameter.method().declaringClass() + "#" + methodParameter.method()).build());
}
}
Aggregations