All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.shrinkwrap.api.Node Maven / Gradle / Ivy

There is a newer version: 2.0.0-beta-2
Show newest version
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();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy