Class ContainerHandleVirtual

java.lang.Object
org.spongepowered.asm.launch.platform.container.ContainerHandleVirtual
All Implemented Interfaces:
IContainerHandle

public class ContainerHandleVirtual extends Object implements IContainerHandle
A virtual container, used to marshal other containers around
  • Constructor Details

    • ContainerHandleVirtual

      public ContainerHandleVirtual(String name)
      .ctor
      Parameters:
      name - Unique container name
  • Method Details

    • getName

      public String getName()
      Get the name of this container
    • setAttribute

      public ContainerHandleVirtual setAttribute(String key, String value)
      Set a virtual attribute on this virtual container
      Parameters:
      key - attribute key
      value - attribute value
      Returns:
      fluent interface
    • add

      Add a nested container to this virtual container
      Parameters:
      nested - Nested container to add
      Returns:
      fluent
    • getAttribute

      public String getAttribute(String name)
      Description copied from interface: IContainerHandle
      Retrieve the value of attribute with the specified name, or null if not present
      Specified by:
      getAttribute in interface IContainerHandle
      Parameters:
      name - attribute name
      Returns:
      attribute value or null if not present
    • getNestedContainers

      public Collection<IContainerHandle> getNestedContainers()
      Description copied from interface: IContainerHandle
      Get nested containers from this container, allows a container to detect and return containers within itself. For example a folder container detecting and returning file containers, or a virtual container returning real containers after a scan.
      Specified by:
      getNestedContainers in interface IContainerHandle
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object