Class ParserSettingsMonitor

java.lang.Object
org.apache.ivy.core.cache.ParserSettingsMonitor

class ParserSettingsMonitor extends Object
Keep traces of the usage of a ParserSettings in order to check afterwards that the relevant settings didn't changed.

A ParserSettingsMonitor provide a ParserSettings that must be used in place of the original one.

The current implementation consider that a settings changed iff one of the used variable has changed.

  • Field Details

  • Constructor Details

    • ParserSettingsMonitor

      public ParserSettingsMonitor(ParserSettings settings)
  • Method Details

    • getMonitoredSettings

      public ParserSettings getMonitoredSettings()
      Returns:
      The parser settings that must be used in place of the original settings The returned object delegates all the call to the original settings.
    • endMonitoring

      public void endMonitoring()
      Free the resource used during the monitoring, keeping only the info required to evaluate hasChanged.
    • hasChanged

      public boolean hasChanged(ParserSettings newSettings)
      Check if the newSettings is compatible with the original settings that has been monitored. Only the info that was actually used is compared.