Class OneShotComponent

java.lang.Object
com.singularsys.jep.misc.OneShotComponent
All Implemented Interfaces:
JepComponent, Serializable
Direct Known Subclasses:
DictionaryComponents, FunctionSet

public abstract class OneShotComponent extends Object implements JepComponent
Components are are initialised only once. On the first call to init(Jep), the method firstInit(Jep) is called. On subsequent calls, firstInit(Jep) is not called.
See Also:
  • Constructor Details

    • OneShotComponent

      public OneShotComponent()
  • Method Details

    • init

      public final void init(Jep jep)
      Description copied from interface: JepComponent
      Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
      Specified by:
      init in interface JepComponent
      Parameters:
      jep - the current Jep instance
    • firstInit

      public abstract void firstInit(Jep jep)
    • getLightWeightInstance

      public JepComponent getLightWeightInstance()
      Since the component is only initialised once, there is no need for a light weight instance.
      Specified by:
      getLightWeightInstance in interface JepComponent
      Returns:
      null