org.prorefactor.refactor.tfnames
Class TFNamesRefactor

java.lang.Object
  extended by org.prorefactor.refactor.tfnames.TFNamesRefactor
All Implemented Interfaces:
IRefactor

public class TFNamesRefactor
extends java.lang.Object
implements IRefactor

Table and Field Names Refactor. An instance of this class stores the settings for the refactoring, and also contains the "run" function which applies the changes for a given Target to a given file scan. Can be called/implemented via org.prorefactor.refactor.TempDirWrap.


Field Summary
 boolean fixCase
          Refactor settings - fix case if case is wrong?
 boolean qualify
          Refactor settings - qualify unqualifed names?
 boolean unabbreviate
          Refactor settings - unabbreviate abbreviated names?
 boolean useDbQualifier
          Refactor settings - prefix names with DB qualifier? (Not currently used)
 boolean useLowercase
          Refactor settings - use lowercase names?
 boolean workTempTables
          Refactor settings - apply changes to work and temp table names?
 
Constructor Summary
TFNamesRefactor()
           
 
Method Summary
 int run(RefactorTarget tar, int scanNum)
          Run this refactor for a given target.
 java.lang.String toString()
          Return a string representation of the settings stored in this Refactor object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

useLowercase

public boolean useLowercase
Refactor settings - use lowercase names?


qualify

public boolean qualify
Refactor settings - qualify unqualifed names?


useDbQualifier

public boolean useDbQualifier
Refactor settings - prefix names with DB qualifier? (Not currently used)


unabbreviate

public boolean unabbreviate
Refactor settings - unabbreviate abbreviated names?


fixCase

public boolean fixCase
Refactor settings - fix case if case is wrong?


workTempTables

public boolean workTempTables
Refactor settings - apply changes to work and temp table names?

Constructor Detail

TFNamesRefactor

public TFNamesRefactor()
Method Detail

run

public int run(RefactorTarget tar,
               int scanNum)
Run this refactor for a given target.

Specified by:
run in interface IRefactor
Parameters:
tar - The NamesTarget object which contains details about the node which needs refactoring.
scanNum - The scan number
Returns:
positive int on success, or a negative int on fail: 2: Wrong target type - nothing done. 1: Successful refactoring done. -1: Failed to synchronize, possibly due to preprocessing or escape sequences in source. -2: Something weird happened.

toString

public java.lang.String toString()
Return a string representation of the settings stored in this Refactor object.

Overrides:
toString in class java.lang.Object


Copyright © 2008 Joanju Software. All Rights Reserved.