org.jboss.shrinkwrap.api.Node Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shrinkwrap-api Show documentation
Show all versions of shrinkwrap-api Show documentation
Client View of the ShrinkWrap Project
package org.jboss.shrinkwrap.api;
import java.util.Set;
import org.jboss.shrinkwrap.api.asset.Asset;
/**
* Represents an entry inside an {@link Archive}. Indicates an empty directory if {@link Node#getAsset()} returns null. May be
* the parent of child {@link Node}s. Lives inside the {@link Archive} under the context denoted by
* {@link Node#getPath()}.
*
* @author German Escobar
*/
public interface Node {
/**
* @return The {@link Asset} this node holds, null if it is an empty directory
*/
Asset getAsset();
/**
* @return The child nodes of this node or, an empty set if it has no children or holds an asset. This method will
* never return null. The returned Set will be an immutable view.
*/
Set getChildren();
/**
* @return The path where this node is placed within the {@link Archive}
*/
ArchivePath getPath();
}