]> git.mxchange.org Git - jfinancials-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java
Added more input fields and overwritten toString() in Gender enum
[jfinancials-lib.git] / Addressbook / src / org / mxchange / addressbook / application / AddressbookApplication.java
index 78efb043b54a1454ae310a142c57faeeb83c7c91..7f55a382725a8c1b0936dc399621f00bccc6ce82 100644 (file)
@@ -127,6 +127,11 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
         */
        public static final String APP_VERSION = "0.0";
 
+       /**
+        * Self instance
+        */
+       private static Application selfInstance;
+
        /**
         * Console client is enabled by default
         */
@@ -137,6 +142,14 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
         */
        private boolean guiClient = false;
 
+       /**
+        * Protected constructor
+        */
+       protected AddressbookApplication () {
+               // Set own instance
+               selfInstance = this;
+       }
+
        /**
         * Getter for printable application name
         *
@@ -334,4 +347,14 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
                this.getLogger().info("End of program (last line)");
                System.exit(0);
        }
+
+       /**
+        * Getter for this application
+        * 
+        * @return Instance from this application
+        */
+       public static final Application getInstance () {
+               // Return it
+               return selfInstance;
+       }
 }