2 Replies Latest reply on Mar 22, 2013 11:33 PM by John Sylora

    Inheritance in Forge

    John Sylora Newbie

      Hello Forge users,

       

      What is the best way to set up inheritance in Forge?

       

      I was able to set it up using the Forge command:

       

      $ java new-class 'public class TestClass2 extends TestClass {}' --package ~.model

       

      Is this the best way? Thank you.

        • 1. Re: Inheritance in Forge
          Lincoln Baxter III Master

          That's probably a good way to do it. We don't really do much with inheritance right now. How would you like to use inheritance that isn't currently supported?

          • 2. Re: Inheritance in Forge
            John Sylora Newbie

            Hi Lincoln,

             

            I'm planning to use inheritance since I have a base class that passes on some properties to the descendant classes which have their own unique properties in addition to the base class parent properties. I use Forge to write the classes. Since Forge doesn't have a specific command for inheritance, I guess I'll have to put the annotations like @Inheritance(strategy = InheritanceType.JOINED) after I make the class. Thanks for the input..