Package org.gradle.api.file
Enum DuplicatesStrategy
- Alle implementierten Schnittstellen:
Serializable,Comparable<DuplicatesStrategy>,java.lang.constant.Constable
Strategies for dealing with the potential creation of duplicate files or archive entries.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum-Konstanten - Übersicht
Enum-KonstantenEnum-KonstanteBeschreibungDo not allow duplicates by ignoring subsequent items to be created at the same path.Throw aDuplicateFileCopyingExceptionwhen subsequent items are to be created at the same path.Do not attempt to prevent duplicates.Uses the same strategy as the parent copy specification.Do not attempt to prevent duplicates, but log a warning message when multiple items are to be created at the same path. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic DuplicatesStrategyGibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück.static DuplicatesStrategy[]values()Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.
-
Enum-Konstanten - Details
-
INCLUDE
Do not attempt to prevent duplicates.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.
-
EXCLUDE
Do not allow duplicates by ignoring subsequent items to be created at the same path.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.
-
WARN
Do not attempt to prevent duplicates, but log a warning message when multiple items are to be created at the same path.This behaves exactly as INCLUDE otherwise.
-
FAIL
Throw aDuplicateFileCopyingExceptionwhen 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.
-
INHERIT
Uses the same strategy as the parent copy specification. This is the default behavior.- Seit:
- 5.0
-
-
Methodendetails
-
values
Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.- Gibt zurück:
- ein Array mit den Konstanten dieses Enumerationstyps in der Reihenfolge ihrer Deklaration
-
valueOf
Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enumerationskonstante in diesem Typ deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)- Parameter:
name- Name der zurückzugebenden Enumerationskonstante.- Gibt zurück:
- Enumerationskonstante mit dem angegebenen Namen
- Löst aus:
IllegalArgumentException- wenn dieser Enumerationstyp keine Konstante mit dem angegebenen Namen enthältNullPointerException- wenn das Argument nicht angegeben wird
-