GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes JAXB: Nested interfaces results in compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB: Nested interfaces results in compile error" Watch "JAXB: Nested interfaces results in compile error" New topic
Author

JAXB: Nested interfaces results in compile error

Andy Metcalfe
Greenhorn

Joined: Nov 23, 2004
Posts: 5
I'm trying to figure out JAXB, I've succesfully autogenerated the classes and interfaces, but I ran into an error.

One of the nested interfaces gives the error "Nested Type FOO hides an enclosing type".

The code looks something like:



package myPackage.jaxb;
public interface FOO {

java.util.List getBAR();

public interface BAR
extends javax.xml.bind.Element, myPackage.jaxb.FOO.FOO
{

}

public interface FOO {
java.lang.String getAssortedStuff();
void setAssortedStuff(java.lang.String value);
...
...
...
}
}



The source schema looks something like



What's going on here? Why is JAXB generating classes that won't compile?

_Am
[ February 22, 2005: Message edited by: Andy Metcalfe ]
 
GeeCON Prague 2014
 
subject: JAXB: Nested interfaces results in compile error