org.apache.ivy.core.cache

Class 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 orignal one.

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

Constructor Summary
ParserSettingsMonitor(ParserSettings settings)
Method Summary
voidendMonitoring()
Free the ressource used during the monitoring, keeping only the info required to evaluate hasChanged.
ParserSettingsgetMonitoredSettings()
booleanhasChanged(ParserSettings newSettings)
Check if the newSettings is compatible with the original settings that has been monitored.

Constructor Detail

ParserSettingsMonitor

public ParserSettingsMonitor(ParserSettings settings)

Method Detail

endMonitoring

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

getMonitoredSettings

public ParserSettings getMonitoredSettings()

Returns: The parser settings that must be used in place of the orignal settings The returned object delegates all the call to the original settings.

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.