Package com.igormaznitsa.jcp
Class JCPreprocessor
- java.lang.Object
-
- com.igormaznitsa.jcp.JCPreprocessor
-
public final class JCPreprocessor extends java.lang.Object
The main class implements the Java Comment Preprocessor, it has the main method and can be started from a command string
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JCPreprocessor.PreprocessingStatistics
-
Field Summary
Fields Modifier and Type Field Description (package private) static CommandLineHandler[]
COMMAND_LINE_HANDLERS
private PreprocessorContext
context
-
Constructor Summary
Constructors Constructor Description JCPreprocessor(PreprocessorContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createDestinationDirectory()
JCPreprocessor.PreprocessingStatistics
execute()
private java.util.Set<java.io.File>
findAllFiles(java.io.File dir)
private java.util.Collection<FileInfoContainer>
findAllFilesToBePreprocessed(java.io.File[] srcDirs)
static java.lang.Iterable<CommandLineHandler>
getCommandLineHandlers()
PreprocessorContext
getContext()
private static void
help()
static void
main(java.lang.String... args)
private JCPreprocessor.PreprocessingStatistics
preprocessFiles(java.util.Collection<FileInfoContainer> files)
private static void
printHeader()
(package private) void
processCfgFiles()
private static PreprocessorContext
processCommandString(PreprocessorContext context, java.lang.String[] originalStrings, java.lang.String[] normalizedStrings)
private void
processFileExclusion(java.util.List<PreprocessingState.ExcludeIfInfo> foundExcludeIf)
private java.util.List<PreprocessingState.ExcludeIfInfo>
processGlobalDirectives(java.util.Collection<FileInfoContainer> files)
-
-
-
Field Detail
-
context
private final PreprocessorContext context
-
COMMAND_LINE_HANDLERS
static final CommandLineHandler[] COMMAND_LINE_HANDLERS
-
-
Constructor Detail
-
JCPreprocessor
public JCPreprocessor(PreprocessorContext context)
-
-
Method Detail
-
getCommandLineHandlers
public static java.lang.Iterable<CommandLineHandler> getCommandLineHandlers()
-
getContext
public PreprocessorContext getContext()
-
execute
public JCPreprocessor.PreprocessingStatistics execute() throws java.io.IOException
- Throws:
java.io.IOException
-
processFileExclusion
private void processFileExclusion(java.util.List<PreprocessingState.ExcludeIfInfo> foundExcludeIf)
-
processGlobalDirectives
private java.util.List<PreprocessingState.ExcludeIfInfo> processGlobalDirectives(java.util.Collection<FileInfoContainer> files) throws java.io.IOException
- Throws:
java.io.IOException
-
preprocessFiles
private JCPreprocessor.PreprocessingStatistics preprocessFiles(java.util.Collection<FileInfoContainer> files) throws java.io.IOException
- Throws:
java.io.IOException
-
createDestinationDirectory
private void createDestinationDirectory() throws java.io.IOException
- Throws:
java.io.IOException
-
findAllFilesToBePreprocessed
private java.util.Collection<FileInfoContainer> findAllFilesToBePreprocessed(java.io.File[] srcDirs) throws java.io.IOException
- Throws:
java.io.IOException
-
findAllFiles
private java.util.Set<java.io.File> findAllFiles(java.io.File dir)
-
main
public static void main(java.lang.String... args)
-
processCommandString
private static PreprocessorContext processCommandString(PreprocessorContext context, java.lang.String[] originalStrings, java.lang.String[] normalizedStrings) throws java.io.IOException
- Throws:
java.io.IOException
-
processCfgFiles
void processCfgFiles() throws java.io.IOException
- Throws:
java.io.IOException
-
printHeader
private static void printHeader()
-
help
private static void help()
-
-