org.exolab.castor.builder.conflictresolution
Interface ClassNameCRStrategy
- BaseClassNameCRStrategy, InformViaLogClassNameCRStrategy, WarningViaDialogClassNameCRStrategy
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.
dealWithClassNameConflict
public SGStateInfo dealWithClassNameConflict(SGStateInfo state,
ClassInfo newClassInfo,
JClass conflict) Implements a specific strategy for dealing with class name conflicts.
state - The current source generator state.newClassInfo - The CLassInfo for the new class to be generated.conflict - The JClass instance representing the potential conflict.
- the source generator state, as modified by the decision.
dealWithFileOverwrite
public 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.
filename - The name of the file to be overwritten.
- True of the file should be overwritten.
getName
public String getName()
Returns the name of this strategy.
- The name of this strategy.
setConsoleDialog
public void setConsoleDialog(ConsoleDialog dialog)
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com