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.
        Parameters:
        owner - the owning object
    • Method Detail

      • getOwner

        public SerializableObject getOwner()
        Returns the owning object.
        Returns:
        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).
        Parameters:
        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.
        Parameters:
        obj - the object to get the command-line for
        Returns:
        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.
        Parameters:
        value - true if loaded/generated
      • isSetupLoadedOrGenerated

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

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

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