Package adams.flow.processor
Class UpdateCallableActorName
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<ActorProcessor>,SizeOfHandler,ActorProcessor,ModifyingProcessor,Serializable,Comparable<ActorProcessor>
public class UpdateCallableActorName extends AbstractNameUpdater<CallableActorReference>
Updates all occurrences of the old callable actor name with the new one.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-old-name <java.lang.String> (property: oldName) The old callable actor name to replace with the new one. default:
-new-name <java.lang.String> (property: newName) The new callable actor name that replaces the old one. default:
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.flow.processor.AbstractNameUpdater
m_NewName, m_OldName
-
Fields inherited from class adams.flow.processor.AbstractModifyingProcessor
m_Modified, m_ModifiedActor, m_NoCopy
-
Fields inherited from class adams.flow.processor.AbstractActorProcessor
m_Errors
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description UpdateCallableActorName()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CallableActorReferencegetReplacement(CallableActorReference old, String newName)Returns the replacement object.StringglobalInfo()Returns a string describing the object.protected booleanisBaseClassMatch(Class cls)Returns whether the base class that we're looking for to perform the replacement on is a match.protected booleanisNameMatch(CallableActorReference old, String oldName)Checks whether the located object matches the old name that requires replacement.StringnewNameTipText()Returns the tip text for this property.StringoldNameTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.processor.AbstractNameUpdater
canProcessClassOptions, canRecurse, canRecurse, createPrefix, defineOptions, getNewName, getOldName, processActor, processArgumentOption, setNewName, setOldName
-
Methods inherited from class adams.flow.processor.AbstractModifyingProcessor
getModifiedActor, getNoCopy, initialize, isModified, process, setNoCopy
-
Methods inherited from class adams.flow.processor.AbstractActorProcessor
addError, addError, checkData, compareTo, equals, getErrors, hasErrors, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.processor.ActorProcessor
compareTo, getErrors, hasErrors, shallowCopy, shallowCopy
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractNameUpdater<CallableActorReference>- Returns:
- a description suitable for displaying in the gui
-
oldNameTipText
public String oldNameTipText()
Returns the tip text for this property.- Specified by:
oldNameTipTextin classAbstractNameUpdater<CallableActorReference>- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
newNameTipText
public String newNameTipText()
Returns the tip text for this property.- Specified by:
newNameTipTextin classAbstractNameUpdater<CallableActorReference>- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
isBaseClassMatch
protected boolean isBaseClassMatch(Class cls)
Returns whether the base class that we're looking for to perform the replacement on is a match.- Specified by:
isBaseClassMatchin classAbstractNameUpdater<CallableActorReference>- Parameters:
cls- the class to check- Returns:
- true if a match
-
isNameMatch
protected boolean isNameMatch(CallableActorReference old, String oldName)
Checks whether the located object matches the old name that requires replacement.- Specified by:
isNameMatchin classAbstractNameUpdater<CallableActorReference>- Parameters:
old- the old object to checkoldName- the old name to look for- Returns:
- true if a match
-
getReplacement
protected CallableActorReference getReplacement(CallableActorReference old, String newName)
Returns the replacement object.- Specified by:
getReplacementin classAbstractNameUpdater<CallableActorReference>- Parameters:
old- the old objectnewName- the new name to use- Returns:
- the replacement object, null in case of error
-
-