public class DefaultManifest extends Object implements Manifest
| Constructor and Description |
|---|
DefaultManifest(FileResolver fileResolver) |
DefaultManifest(Object manifestPath,
FileResolver fileResolver) |
| Modifier and Type | Method and Description |
|---|---|
DefaultManifest |
attributes(Map<String,?> attributes)
Adds content to the main attributes of the manifest.
|
DefaultManifest |
attributes(Map<String,?> attributes,
String sectionName)
Adds content to the given section of the manifest.
|
DefaultManifest |
clear() |
DefaultManifest |
from(Object... mergePaths)
Specifies other manifests to be merged into this manifest.
|
DefaultManifest |
from(Object mergePaths,
Closure closure)
Specifies other manifests to be merged into this manifest.
|
Attributes |
getAttributes()
Returns the main attributes of the manifest.
|
DefaultManifest |
getEffectiveManifest()
Returns a new manifest instance where all the attribute values are expanded (e.g.
|
protected DefaultManifest |
getEffectiveManifestInternal(DefaultManifest baseManifest) |
List<ManifestMergeSpec> |
getMergeSpecs() |
Map<String,Attributes> |
getSections()
Returns the sections of the manifest (excluding the main section).
|
boolean |
isEqualsTo(Object o) |
DefaultManifest |
mainAttributes(Map<String,?> attributes) |
Manifest |
writeTo(Object path)
Writes the manifest into a file.
|
DefaultManifest |
writeTo(Writer writer)
Writes the manifest into a writer.
|
public DefaultManifest(FileResolver fileResolver)
public DefaultManifest(Object manifestPath, FileResolver fileResolver)
public DefaultManifest mainAttributes(Map<String,?> attributes)
public DefaultManifest attributes(Map<String,?> attributes)
Manifestattributes in interface Manifestattributes - The values to add to the main attributes. The values can be any object. For evaluating the value objects
their Object.toString() method is used. This is done lazily either before writing or when Manifest.getEffectiveManifest()
is called.public DefaultManifest attributes(Map<String,?> attributes, String sectionName)
Manifestattributes in interface Manifestattributes - The values to add to the section. The values can be any object. For evaluating the value objects
their Object.toString() method is used. This is done lazily either before writing or when Manifest.getEffectiveManifest()
is called.sectionName - The name of the sectionpublic Attributes getAttributes()
ManifestgetAttributes in interface Manifestpublic Map<String,Attributes> getSections()
ManifestgetSections in interface Manifestpublic DefaultManifest clear()
public DefaultManifest from(Object... mergePaths)
ManifestManifest or a file path as interpreted by Project.files(Object...).
The merge is not happening instantaneously. It happens either before writing or when Manifest.getEffectiveManifest()
is called.public DefaultManifest from(Object mergePaths, Closure closure)
ManifestManifest.from(Object...).
The merge is not happening instantaneously. It happens either before writing or when Manifest.getEffectiveManifest()
is called.
The closure configures the underlying ManifestMergeSpec.public DefaultManifest getEffectiveManifest()
ManifestManifest.from(Object...).getEffectiveManifest in interface Manifestprotected DefaultManifest getEffectiveManifestInternal(DefaultManifest baseManifest)
public DefaultManifest writeTo(Writer writer)
Manifestpublic Manifest writeTo(Object path)
ManifestProject.files(Object...)public List<ManifestMergeSpec> getMergeSpecs()
public boolean isEqualsTo(Object o)
Copyright © 2013. All rights reserved