in extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java [113:151]
private void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
BuildProducer<LambdaCapturingTypeBuildItem> lambdaCapturingTypeProducer, Class<?> aClass) {
RegisterForReflection annotation = aClass.getAnnotation(RegisterForReflection.class);
if (annotation == null) {
return;
}
for (String lambdaCapturingType : annotation.lambdaCapturingTypes()) {
lambdaCapturingTypeProducer.produce(new LambdaCapturingTypeBuildItem(lambdaCapturingType));
}
boolean methods = annotation.methods();
boolean fields = annotation.fields();
boolean ignoreNested = annotation.ignoreNested();
boolean serialization = annotation.serialization();
boolean unsafeAllocated = annotation.unsafeAllocated();
if (annotation.registerFullHierarchy()) {
LOG.warn(
"The element 'registerFullHierarchy' of the annotation 'RegisterForReflection' is not supported by the extension Camel Java jOOR DSL");
}
Class<?>[] targets = annotation.targets();
String[] classNames = annotation.classNames();
if (targets.length == 0 && classNames.length == 0) {
// No target and classname set, the target is then the class itself
registerClass(aClass, aClass.getName(), methods, fields, ignoreNested, serialization,
unsafeAllocated, reflectiveClass);
return;
}
for (Class<?> type : targets) {
registerClass(type, type.getName(), methods, fields, ignoreNested, serialization,
unsafeAllocated, reflectiveClass);
}
for (String className : classNames) {
registerClass(null, className, methods, fields, ignoreNested, serialization, unsafeAllocated,
reflectiveClass);
}
}