org.jaffa.tools.common
Class SourceDecomposerUtils

java.lang.Object
  extended byorg.jaffa.tools.common.SourceDecomposerUtils

public class SourceDecomposerUtils
extends Object

Utilities class for the SourceDecomposer.


Constructor Summary
SourceDecomposerUtils()
           
 
Method Summary
static boolean isJaffaOverwriteMarkerPresent(File file)
          This method will check the code generated file for the '//JAFFA-OVERWRITE' marker.
static void listCustomizations(File file, BufferedWriter writer, String customizationFilter)
          This method will list the customizations added to a code generated file.
static void listCustomizations(File dir, String fileFilter, boolean recursive, BufferedWriter writer, String customizationFilter)
          This method will list the customizations added to code generated files.
static void listCustomizations(String dir, String fileFilter, boolean recursive, BufferedWriter writer, String customizationFilter)
          This method will list the customizations added to code generated files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceDecomposerUtils

public SourceDecomposerUtils()
Method Detail

listCustomizations

public static void listCustomizations(String dir,
                                      String fileFilter,
                                      boolean recursive,
                                      BufferedWriter writer,
                                      String customizationFilter)
                               throws IOException,
                                      SourceDecomposerException
This method will list the customizations added to code generated files.

Parameters:
dir - the directory containing the the code generated files.
fileFilter - the files will be selected based on this filter. if no value is specified, then all files will be picked up.
recursive - if true, then the sub-folders will be checked too.
writer - the customizations will be written to this writer.
customizationFilter - the customizations will be filtered based on this paramter. If no value is passed, then all the customizations will be listed.
Throws:
IOException - if any IO error occurs.
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.

listCustomizations

public static void listCustomizations(File dir,
                                      String fileFilter,
                                      boolean recursive,
                                      BufferedWriter writer,
                                      String customizationFilter)
                               throws IOException,
                                      SourceDecomposerException
This method will list the customizations added to code generated files.

Parameters:
dir - the directory containing the the code generated files.
fileFilter - the files will be selected based on this filter. if no value is specified, then all files will be picked up.
recursive - if true, then the sub-folders will be checked too.
writer - the customizations will be written to this writer.
customizationFilter - the customizations will be filtered based on this paramter. If no value is passed, then all the customizations will be listed.
Throws:
IOException - if any IO error occurs.
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.

listCustomizations

public static void listCustomizations(File file,
                                      BufferedWriter writer,
                                      String customizationFilter)
                               throws IOException,
                                      SourceDecomposerException
This method will list the customizations added to a code generated file.

Parameters:
file - the code generated file.
writer - the customizations will be written to this writer.
customizationFilter - the customizations will be filtered based on this paramter. If no value is passed, then all the customizations will be listed.
Throws:
IOException - if any IO error occurs.
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.

isJaffaOverwriteMarkerPresent

public static boolean isJaffaOverwriteMarkerPresent(File file)
                                             throws IOException
This method will check the code generated file for the '//JAFFA-OVERWRITE' marker. Returns a true if the marker is found.

Parameters:
file - the code generated file.
Returns:
true if the '//JAFFA-OVERWRITE' marker is found in the input file.
Throws:
IOException - if any IO error occurs.


Copyright © 2002-2004 JAFFA Project.