Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1926 Adding more commands to Forge and improve existing ones
  3. FORGE-2374

Being able to generate an abstract or final Java class implementing serializable or not

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 2.19.1.Final
    • 2.16.2.Final
    • UI - API

      At the moment the java-new-class only has a targetPackage and named parameter. It would be good to be able to generate abstract or final classes with serializable interfaces

      $ java-new-class --named MyClass --isAbstract
      
      public abstract class MyClass {
      }
      

      Or final :

      $ java-new-class --named MyClass --isFinal
      
      public final class MyClass {
      }
      

      What we have to be careful is that a class cannot be abstract and final. So the following is illegal :

      $ java-new-class --named MyClass --isFinal --isAbstract --serializable
      
      public final abstract class MyClass implements Serializable {
      }
      

            rhn-support-ggastald George Gastaldi
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: