|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<FileTransformer.Mode>
de.unkrig.commons.file.filetransformation.FileTransformer.Mode
public static enum FileTransformer.Mode
FileTransformer.transform(String, File, File, Mode),
TRANSFORM,
CHECK,
CHECK_AND_TRANSFORM| Enum Constant Summary | |
|---|---|
CHECK
Execute the operation, but do not create or modify any files, and throw FileTransformer.NOT_IDENTICAL iff the
operation does not produce an identical result. |
|
CHECK_AND_TRANSFORM
Before executing the actual transformation, verify that it will actually modify any files. |
|
TRANSFORM
Execute the operation without previously checking if it actually changes any files. |
|
| Method Summary | |
|---|---|
static FileTransformer.Mode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static FileTransformer.Mode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final FileTransformer.Mode TRANSFORM
public static final FileTransformer.Mode CHECK
FileTransformer.NOT_IDENTICAL iff the
operation does not produce an identical result. Since FileTransformer.transform(String, File, File,
Mode) is typically much cheaper in this mode than in mode TRANSFORM, it may be efficient to
execute the FileTransformer in this mode first to check whether the transformation would modify and
files, before executing it in TRANSFORM mode, particularly if you do not expect any modifications.
public static final FileTransformer.Mode CHECK_AND_TRANSFORM
Since checking whether a transformation would actually change any files is typically much cheaper than
the executing the actual transformation, this mode may be more efficient than TRANSFORM,
particularly if you expect few or no modifications.
| Method Detail |
|---|
public static FileTransformer.Mode[] values()
for (FileTransformer.Mode c : FileTransformer.Mode.values()) System.out.println(c);
public static FileTransformer.Mode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||