Understanding JAXB: Java Binding Customization
Subject:   Polymorphic behaviour problem
Date:   2003-12-25 14:58:18
From:   anonymous2
I still did not understand how you would achieve polymorphism. Say you have an external class Shape like
public class Shape {
protected Color color ;
protected Color getColor() { return color ; }
protected void setColor(Color color) { ... }

Now if you have your Rectangle,Square,Circle extending this base class, how would you avoid the "instanceof" to do "processing of the Shapes" since all the Widgets have different attribs ?

1 to 1 of 1
1 to 1 of 1