davsclaus commented on code in PR #10000:
URL: https://github.com/apache/camel/pull/10000#discussion_r1198828420


##########
dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java:
##########
@@ -847,7 +847,33 @@ private boolean generateSetValue(String modelName, 
CodeBlock.Builder cb, FieldIn
         cb.beginControlFlow("case $S:", fieldName);
 
         ClassInfo c = view.getClassByName(field.type().name());
-        if (c != null && c.isEnum()) {
+        if (hasAnnotation(field, XML_JAVA_TYPE_ADAPTER_CLASS)) {
+            // conversion using JAXB Adapter of known class
+            Optional<AnnotationValue> adapter = annotationValue(field, 
XML_JAVA_TYPE_ADAPTER_CLASS, "value");
+            if (adapter.isEmpty()) {
+                return false;
+            }
+            String adapterClass = adapter.get().asClass().name().toString();
+            ClassInfo adapterClassInfo = 
view.getClassByName(adapter.get().asClass().name());
+            if (adapterClassInfo.superClassType().kind() == 
Type.Kind.PARAMETERIZED_TYPE) {
+                List<Type> arguments = 
adapterClassInfo.superClassType().asParameterizedType().arguments();
+                if (arguments.size() == 2) {
+                    // extends XmlAdapter<BeanPropertiesDefinition, 
Map<String, Object>>

Review Comment:
   I guess there is some left over code here that has been disabled



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to