public enum PreprocessorUtils extends Enum<PreprocessorUtils>
Modifier and Type | Method and Description |
---|---|
static void |
assertNotNull(String message,
Object obj) |
static void |
copyFile(File source,
File dest) |
static String |
extractTail(String prefix,
String value) |
static String |
extractTrimmedTail(String prefix,
String value) |
static String |
getFileExtension(File file) |
static String |
getFilePath(File file) |
static String |
getNextLineCodes() |
static boolean |
isFileContentEquals(File src,
File dst) |
static String |
leftTrim(String rawString) |
static BufferedReader |
makeFileReader(File file,
String charset,
int bufferSize) |
static String |
normalizeVariableName(String name) |
static String |
processMacroses(String processingString,
PreprocessorContext context) |
static byte[] |
readFileAsByteArray(File file) |
static String[] |
readWholeTextFileIntoArray(File file,
String encoding,
AtomicBoolean endedByNextLine) |
static String[] |
replaceChar(String[] source,
char toBeReplaced,
char replacement) |
static String[] |
replaceStringPrefix(String[] allowedPrefixesToBeReplaced,
String replacement,
String[] strings) |
static String[] |
splitExtensionCommaList(String extensions) |
static String[] |
splitForChar(String string,
char delimiter) |
static String[] |
splitForEqualChar(String string) |
static void |
throwPreprocessorException(String msg,
String processingString,
File srcFile,
int nextStringIndex,
Throwable cause) |
static PreprocessorUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PreprocessorUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final String LINE_END
public static PreprocessorUtils[] values()
for (PreprocessorUtils c : PreprocessorUtils.values()) System.out.println(c);
public static PreprocessorUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static BufferedReader makeFileReader(File file, String charset, int bufferSize) throws IOException
IOException
public static String[] replaceChar(String[] source, char toBeReplaced, char replacement)
public static void copyFile(File source, File dest) throws IOException
IOException
public static String processMacroses(String processingString, PreprocessorContext context)
public static String[] readWholeTextFileIntoArray(File file, String encoding, AtomicBoolean endedByNextLine) throws IOException
IOException
public static byte[] readFileAsByteArray(File file) throws IOException
IOException
public static void throwPreprocessorException(String msg, String processingString, File srcFile, int nextStringIndex, Throwable cause)
public static String[] replaceStringPrefix(String[] allowedPrefixesToBeReplaced, String replacement, String[] strings)
public static String getNextLineCodes()
public static boolean isFileContentEquals(File src, File dst) throws IOException
IOException
Copyright © 2011–2019 Igor Maznitsa. All rights reserved.