Class ManifestSection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddManifestEntries(Map<String, String> map) Adds all entries from the given map as manifest attributes.voidaddManifestEntry(String key, String value) Adds a single manifest entry.Returns the manifest entries map.getName()Getter for the fieldname.booleanisManifestEntriesEmpty.voidSetter for the fieldname.
-
Constructor Details
-
ManifestSection
public ManifestSection()
-
-
Method Details
-
addManifestEntry
Adds a single manifest entry.A
nullvalue is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to passnullunintentionally (e.g., from an unguarded map lookup), as the resulting empty attribute will not indicate any error.- Parameters:
key- the manifest attribute namevalue- the manifest attribute value;nullis treated as an empty string
-
getManifestEntries
Returns the manifest entries map.Values in the returned map may be
null. Such entries are treated as empty strings when written to the manifest.- Returns:
- the entries
-
getName
Getter for the field
name.- Returns:
- the name
-
setName
Setter for the field
name.- Parameters:
name- the name
-
addManifestEntries
Adds all entries from the given map as manifest attributes.A
nullvalue in the map is accepted and produces an empty-string attribute in the manifest. This is intentional: it allows callers to explicitly request an empty manifest entry. Be careful not to passnullvalues unintentionally, as they will not indicate any error.- Parameters:
map- the manifest entries to add. Map values may benull, which are treated as empty strings
-
isManifestEntriesEmpty
public boolean isManifestEntriesEmpty()isManifestEntriesEmpty.
- Returns:
- true if empty false otherwise
-