Hi,

When I run bindgen tool on classes with generic types like MyClass<T
extends BaseClass> throws "java.lang.IllegalStateException". Looks like the
tool is unable to handle the "T" placeholder. Please help to solve this
problem as we have lot of generic types defined similar to the one
mentioned in the below example.

Example class with generic type:

public class MyClass<T extends BaseClass> {

    private List<T> details;

    public List<T> getDetails() {
        return details;
    }

    public void setDetails(List<T> details) {
        this.details = details;
    }
}

Exception stacktrace from bindgen tool:

*bindgen:
     [echo] Running BindGen tool
     [java] Exception in thread "main" java.lang.IllegalStateException:
Internal error: unable to find class T
     [java]     at
org.jibx.custom.classes.ClassCustom.apply(ClassCustom.java:607)
     [java]     at
org.jibx.custom.classes.GlobalCustom.addClassCustomization(GlobalCustom.java:377)
     [java]     at
org.jibx.binding.generator.BindGen.isValueClass(BindGen.java:134)
     [java]     at
org.jibx.binding.generator.BindGen.checkInclude(BindGen.java:172)
     [java]     at
org.jibx.binding.generator.BindGen.expandReferences(BindGen.java:228)
     [java]     at
org.jibx.binding.generator.BindGen.findReferences(BindGen.java:1010)
     [java]     at
org.jibx.binding.generator.BindGen.generate(BindGen.java:1124)
     [java]     at
org.jibx.binding.generator.BindGen.main(BindGen.java:1302)
*

Thanks,
Ragav Nagarajan
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to