public static enum FileTransformer.Mode extends java.lang.Enum<FileTransformer.Mode>
| Enum Constant and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
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 namejava.lang.NullPointerException - if the argument is null