Package adams.core

Class SerializableObjectHelper

    • Field Detail

      • m_SetupLoadedOrGenerated

        protected boolean m_SetupLoadedOrGenerated
        whether the setup got loaded or generated already.
      • m_Strict

        protected boolean m_Strict
        whether to enforce strict option checks (ie rebuild if different) or just warn.
    • Constructor Detail

      • SerializableObjectHelper

        public SerializableObjectHelper​(SerializableObject owner)
        Initializes the helper.
        owner - the owning object
    • Method Detail

      • getOwner

        public SerializableObject getOwner()
        Returns the owning object.
        the owner this helper belongs to
      • reset

        public void reset()
        Resets the helper, i.e., it will attempt to load the setup again.
      • setStrict

        public void setStrict​(boolean value)
        Sets whether to use strict mode (options HAVE to be the same) or not (simply output warning that options changed).
        value - whether options have changed
      • isStrict

        public boolean isStrict()
        Returns whether to use strict mode (options HAVE to be the same) or not (simple warning then).
      • getCommandLine

        protected String getCommandLine​(Object obj)
        Obtains the command-line for the object.
        obj - the object to get the command-line for
        the command-line
      • generateSetup

        public void generateSetup()
        Forces the owner to regenerate all objects that are necessary for serialization.
      • setSetupLoadedOrGenerated

        public void setSetupLoadedOrGenerated​(boolean value)
        Sets whether the setup was loaded/generated.
        value - true if loaded/generated
      • isSetupLoadedOrGenerated

        public boolean isSetupLoadedOrGenerated()
        Returns whether the setup was loaded/generated.
        true if loaded/generated
      • toString

        public String toString()
        Generates some information.
        toString in class Object
        the information
      • destroy

        public void destroy()
        Frees up memory in a "destructive" non-reversible way.
        Specified by:
        destroy in interface Destroyable