Class InclusionSpecification
-
- All Implemented Interfaces:
public final class InclusionSpecificationA FileInclusionSpecification is at minimum a source-declaration from which files and directories will be included in the server pack to be generated.
Optionally, the following values can be specified:
Destination
Inclusion-filter (regex)
Exclusion-filter (regex)
When a destination is specified, then every file and directory acquired from the source will be copied to the specified destination in the server pack, whereas otherwise the source would be copied to a destination in the server pack matching the name of the source.
Inclusion filters help to further limit the files and directories to be included from the specified source. Any file and directory matching this filter will be included.
Exclusion filters help to further limit the files and directories to be included from the specified source. Any file and directory matching this filter will NOT be included.
Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private Stringsourceprivate Stringdestinationprivate StringinclusionFilterprivate StringexclusionFilter
-
Constructor Summary
Constructors Constructor Description InclusionSpecification(String source, String destination, String inclusionFilter, String exclusionFilter)
-
Method Summary
Modifier and Type Method Description final StringgetSource()What to copy, relative to the modpack directory. final UnitsetSource(String value)What to copy, relative to the modpack directory. final StringgetDestination()Where it lands in the server pack, or nullto keep the source's own name.final UnitsetDestination(String value)Where it lands in the server pack, or nullto keep the source's own name.final StringgetInclusionFilter()Regex narrowing which files under source are copied, or nullfor all of them.final UnitsetInclusionFilter(String value)Regex narrowing which files under source are copied, or nullfor all of them.final StringgetExclusionFilter()Regex removing files that inclusionFilter would otherwise have kept, or nullfor none.final UnitsetExclusionFilter(String value)Regex removing files that inclusionFilter would otherwise have kept, or nullfor none.final BooleanhasInclusionFilter()Whether this inclusion-spec has an Inclusion-Filter present. final BooleanhasExclusionFilter()Whether this inclusion-spec has an Exclusion-Filter present. final BooleanhasDestination()Whether this inclusion-spec has a destination in the server-pack-to-be set. final BooleanisGlobalFilter()Whether this inclusion-spec is a global filter to be applied to every inclusion. final HashMap<String, String>asHashMap()Get this inclusion-spec as a hashmap. Booleanequals(Object other)Value-equality across source, destination and both filters, so two inclusions describing the same files compare equal — enabling list-deduplication and the editor's dirty-check. IntegerhashCode()Hash-code consistent with equals, derived from source, destination and both filters. -
-
Method Detail
-
getDestination
final String getDestination()
Where it lands in the server pack, or
nullto keep the source's own name.
-
setDestination
final Unit setDestination(String value)
Where it lands in the server pack, or
nullto keep the source's own name.
-
getInclusionFilter
final String getInclusionFilter()
Regex narrowing which files under source are copied, or
nullfor all of them.
-
setInclusionFilter
final Unit setInclusionFilter(String value)
Regex narrowing which files under source are copied, or
nullfor all of them.
-
getExclusionFilter
final String getExclusionFilter()
Regex removing files that inclusionFilter would otherwise have kept, or
nullfor none.
-
setExclusionFilter
final Unit setExclusionFilter(String value)
Regex removing files that inclusionFilter would otherwise have kept, or
nullfor none.
-
hasInclusionFilter
final Boolean hasInclusionFilter()
Whether this inclusion-spec has an Inclusion-Filter present.
-
hasExclusionFilter
final Boolean hasExclusionFilter()
Whether this inclusion-spec has an Exclusion-Filter present.
-
hasDestination
final Boolean hasDestination()
Whether this inclusion-spec has a destination in the server-pack-to-be set.
-
isGlobalFilter
final Boolean isGlobalFilter()
Whether this inclusion-spec is a global filter to be applied to every inclusion. A global filter requires the source to be empty and/or blank and an inclusion- or exclusion-filter to be set.
-
equals
Boolean equals(Object other)
Value-equality across source, destination and both filters, so two inclusions describing the same files compare equal — enabling list-deduplication and the editor's dirty-check.
-
-
-
-