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 CallableActorReference
getReplacement(CallableActorReference old, String newName)
Returns the replacement object.String
globalInfo()
Returns a string describing the object.protected boolean
isBaseClassMatch(Class cls)
Returns whether the base class that we're looking for to perform the replacement on is a match.protected boolean
isNameMatch(CallableActorReference old, String oldName)
Checks whether the located object matches the old name that requires replacement.String
newNameTipText()
Returns the tip text for this property.String
oldNameTipText()
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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractNameUpdater<CallableActorReference>
- Returns:
- a description suitable for displaying in the gui
-
oldNameTipText
public String oldNameTipText()
Returns the tip text for this property.- Specified by:
oldNameTipText
in 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:
newNameTipText
in 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:
isBaseClassMatch
in 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:
isNameMatch
in 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:
getReplacement
in classAbstractNameUpdater<CallableActorReference>
- Parameters:
old
- the old objectnewName
- the new name to use- Returns:
- the replacement object, null in case of error
-
-