|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassNameCRStrategy
Strategy pattern for dealing with class name conflicts during source code generation. The various implementations of this stragtegy will implement individual approaches for dealing with such a naming collision.
Method Summary | |
---|---|
SGStateInfo |
dealWithClassNameConflict(SGStateInfo state,
ClassInfo newClassInfo,
JClass conflict)
Implements a specific strategy for dealing with class name conflicts. |
boolean |
dealWithFileOverwrite(java.lang.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. |
java.lang.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. |
Method Detail |
---|
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(java.lang.String filename)
filename
- The name of the file to be overwritten.
java.lang.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |