This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB: Nested interfaces results in compile error

 
Andy Metcalfe
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic