org.exolab.castor.builder.conflictresolution
Class InformViaLogClassNameCRStrategy
- ClassNameCRStrategy
public final class InformViaLogClassNameCRStrategy
An implementation of
ClassNameCRStrategy
that
reports any conflict notifications to a log file, basically
stating what classes have been overwriten as a result of such
a name conflict.
static String | NAME - Name of this strategy.
|
InformViaLogClassNameCRStrategy() - Creates an instance of this name conflict resolution strategy, that will
emit warnings to the user as part of a standard logging aproach.
|
NAME
public static final String NAME
Name of this strategy.
InformViaLogClassNameCRStrategy
public InformViaLogClassNameCRStrategy()
Creates an instance of this name conflict resolution strategy, that will
emit warnings to the user as part of a standard logging aproach.
dealWithClassNameConflict
public SGStateInfo dealWithClassNameConflict(SGStateInfo state,
ClassInfo newClassInfo,
JClass conflict)
Handle a class name conflict between newClassInfo and conflict.
- dealWithClassNameConflict in interface ClassNameCRStrategy
state
- SourceGeneration statenewClassInfo
- ClassInfo for the new classconflict
- JClass for the existing class
- the provided source generator state, as modified by the strategy
dealWithFileOverwrite
public boolean dealWithFileOverwrite(String filename)
Presents the user with a console dialog, asking for confirmation whether
an existing file should be overwritten (or not).
- dealWithFileOverwrite in interface ClassNameCRStrategy
filename
- the filename to potentially overwrite.
- whether or not the file should be overwritten.
getName
public String getName()
Returns the name of the strategy.
- getName in interface ClassNameCRStrategy
- the name of the strategy.
setConsoleDialog
public void setConsoleDialog(ConsoleDialog dialog)
Sets the console dialog to use with this strategy.
- setConsoleDialog in interface ClassNameCRStrategy
dialog
- the console dialog to use with this strategy.
setConsoleDialog(org.exolab.castor.util.dialog.ConsoleDialog)
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com