File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call nested classes inside constructor?

 
Michael Lars
Greenhorn
Posts: 20
Java jQuery Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

Maybe I don't have formulated the question correctly, but what i want to do is:

Product p = new C1(C2(C3(obj)));

where (classes) C1,C2,C3 are not ordered (can be random or repetitive)!

How can i do this on run-time?

Thank you!
 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The new only applies to your C1 object. If you want to create the other objects as well you need something like this
 
Michael Lars
Greenhorn
Posts: 20
Java jQuery Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic