public interface ClassNameCRStrategy
Modifier and Type | Method and Description |
---|---|
SGStateInfo |
dealWithClassNameConflict(SGStateInfo state,
ClassInfo newClassInfo,
JClass conflict)
Implements a specific strategy for dealing with class name conflicts.
|
boolean |
dealWithFileOverwrite(String filename)
Implements a specific strategy for dealing with the fact that -- for a
given file name -- an artifact with the same name already exists.
|
String |
getName()
Returns the name of this strategy.
|
void |
setConsoleDialog(ConsoleDialog dialog)
Sets the
ConsoleDialog instance to use (if required). |
void |
setSingleClassGenerator(SingleClassGenerator generator)
Injects the
SingleClassGenerator instance that actually is
calling a method of this strategy. |
SGStateInfo dealWithClassNameConflict(SGStateInfo state, ClassInfo newClassInfo, JClass conflict)
state
- The current source generator state.newClassInfo
- The CLassInfo
for the new class to be generated.conflict
- The JClass
instance representing the potential conflict.boolean dealWithFileOverwrite(String filename)
filename
- The name of the file to be overwritten.String getName()
void setConsoleDialog(ConsoleDialog dialog)
ConsoleDialog
instance to use (if required).dialog
- the ConsoleDialog
instance to use (if required).void setSingleClassGenerator(SingleClassGenerator generator)
SingleClassGenerator
instance that actually is
calling a method of this strategy.generator
- The calling SingleClassGenerator
SingleClassGenerator
Copyright © 2024. All rights reserved.