]> git.mxchange.org Git - jcore.git/blobdiff - src/org/mxchange/jcore/BaseFrameworkSystem.java
Cleanup through inspection
[jcore.git] / src / org / mxchange / jcore / BaseFrameworkSystem.java
index 7276e42751ea7a4754015b34a1c0264822fe6199..481508fffda767104db200cea5e27f5687889cf6 100644 (file)
@@ -39,6 +39,26 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
         */
        private static FrameworkInterface selfInstance;
 
+       /**
+        * Getter for this application
+        * <p>
+        * @return Instance from this application
+        */
+       public static FrameworkInterface getInstance () {
+               // Return it
+               return selfInstance;
+       }
+
+       /**
+        * Checks if the bundle is initialized
+        * <p>
+        * @return Whether the bundle has been initialized
+        */
+       protected static boolean isBundledInitialized () {
+               // Check it
+               return (bundle instanceof ResourceBundle);
+       }
+
        /**
         * Application instance
         */
@@ -68,19 +88,56 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
        protected BaseFrameworkSystem () {
        }
 
+       @Override
+       public Application getApplication () {
+               return this.application;
+       }
+
+       @Override
+       public Facade getFacade () {
+               return this.facade;
+       }
+
+       @Override
+       public String getMessageStringFromKey (final String key) {
+               // Return message
+               return this.getBundle().getString(key);
+       }
+
        /**
-        * Getter for this application
+        * Getter for bundle instance
         * <p>
-        * @return Instance from this application
+        * @return Resource bundle
         */
-       public static FrameworkInterface getInstance () {
-               // Return it
-               return selfInstance;
+       protected ResourceBundle getBundle () {
+               return BaseFrameworkSystem.bundle;
        }
 
-       @Override
-       public Application getApplication () {
-               return this.application;
+       /**
+        * Setter for bundle instance
+        * <p>
+        * @param bundle the bundle to set
+        */
+       protected static void setBundle (final ResourceBundle bundle) {
+               BaseFrameworkSystem.bundle = bundle;
+       }
+
+       /**
+        * Manager instance
+        * <p>
+        * @param facade the facade instance to set
+        */
+       protected void setFacade (final Facade facade) {
+               this.facade = facade;
+       }
+
+       /**
+        * Application instance
+        * <p>
+        * @param application the application to set
+        */
+       protected void setApplication (final Application application) {
+               this.application = application;
        }
 
        @Override
@@ -88,6 +145,15 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                return this.client;
        }
 
+       /**
+        * Client instance
+        * <p>
+        * @param client the client to set
+        */
+       protected void setClient (final Client client) {
+               this.client = client;
+       }
+
        /**
         * Converts null to empty string or leaves original object untouched.
         * <p>
@@ -137,62 +203,6 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                return tokens;
        }
 
-       /**
-        * Client instance
-        * <p>
-        * @param client the client to set
-        */
-       protected void setClient (final Client client) {
-               this.client = client;
-       }
-
-       /**
-        * Application instance
-        * <p>
-        * @param application the application to set
-        */
-       protected void setApplication (final Application application) {
-               this.application = application;
-       }
-
-       @Override
-       public Facade getFacade () {
-               return this.facade;
-       }
-
-       /**
-        * Manager instance
-        * <p>
-        * @param facade the facade instance to set
-        */
-       protected void setFacade (final Facade facade) {
-               this.facade = facade;
-       }
-
-       @Override
-       public String getMessageStringFromKey (final String key) {
-               // Return message
-               return this.getBundle().getString(key);
-       }
-
-       /**
-        * Getter for bundle instance
-        * <p>
-        * @return Resource bundle
-        */
-       protected ResourceBundle getBundle () {
-               return BaseFrameworkSystem.bundle;
-       }
-
-       /**
-        * Setter for bundle instance
-        * <p>
-        * @param bundle the bundle to set
-        */
-       protected static void setBundle (final ResourceBundle bundle) {
-               BaseFrameworkSystem.bundle = bundle;
-       }
-
        /**
         * Initializes i18n bundles
         */
@@ -207,13 +217,4 @@ public abstract class BaseFrameworkSystem implements FrameworkInterface {
                setBundle(ResourceBundle.getBundle(FrameworkInterface.I18N_BUNDLE_FILE)); // NOI18N
        }
 
-       /**
-        * Checks if the bundle is initialized
-        * <p>
-        * @return Whether the bundle has been initialized
-        */
-       protected static boolean isBundledInitialized () {
-               // Check it
-               return (bundle instanceof ResourceBundle);
-       }
 }