@Incubating public enum DuplicatesStrategy extends Enum<DuplicatesStrategy>
列挙型定数と説明 |
---|
EXCLUDE
Do not allow duplicates by ignoring subsequent items to be created at the same path.
|
FAIL
Throw a
DuplicateFileCopyingException when subsequent items are to be created at the same path. |
INCLUDE
Do not attempt to prevent duplicates.
|
WARN
Do not attempt to prevent duplicates, but log a warning message when multiple items
are to be created at the same path.
|
修飾子とタイプ | メソッドと説明 |
---|---|
static DuplicatesStrategy |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static DuplicatesStrategy[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final DuplicatesStrategy INCLUDE
If the destination of the operation supports duplicates (e.g. zip files) then a duplicate entry will be created. If the destination does not support duplicates, the existing destination entry will be overridden with the duplicate.
public static final DuplicatesStrategy EXCLUDE
If an attempt is made to create a duplicate file/entry during an operation, ignore the item. This will leave the file/entry that was first copied/created in place.
public static final DuplicatesStrategy WARN
This behaves exactly as INCLUDE otherwise.
public static final DuplicatesStrategy FAIL
DuplicateFileCopyingException
when subsequent items are to be created at the same path.
Use this strategy when duplicates are an error condition that should cause the build to fail.
public static DuplicatesStrategy[] values()
for(DuplicatesStrategy c: DuplicatesStrategy.values()) System.out.println(c);
public static DuplicatesStrategy valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合NullPointerException
- 引数がnullの場合