Class ContainerHandleVirtual
- java.lang.Object
-
- org.spongepowered.asm.launch.platform.container.ContainerHandleVirtual
-
- All Implemented Interfaces:
IContainerHandle,IMixinConfigSource
public class ContainerHandleVirtual extends java.lang.Object implements IContainerHandle
A virtual container, used to marshal other containers around
-
-
Constructor Summary
Constructors Constructor Description ContainerHandleVirtual(java.lang.String name).ctor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerHandleVirtualadd(IContainerHandle nested)Add a nested container to this virtual containerbooleanequals(java.lang.Object obj)java.lang.StringgetAttribute(java.lang.String name)Retrieve the value of attribute with the specified name, or null if not presentjava.lang.StringgetDescription()Plain text description of the config source, can be as descriptive as necessary to help the user identify the source, for example could be the full path to the source item, or something more descriptive.java.lang.StringgetId()Get the identifier for this sourcejava.lang.StringgetName()Get the name of this containerjava.util.Collection<IContainerHandle>getNestedContainers()Get nested containers from this container, allows a container to detect and return containers within itself.inthashCode()ContainerHandleVirtualsetAttribute(java.lang.String key, java.lang.String value)Set a virtual attribute on this virtual containerjava.lang.StringtoString()
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:IMixinConfigSourceGet the identifier for this source- Specified by:
getIdin interfaceIMixinConfigSource
-
getDescription
public java.lang.String getDescription()
Description copied from interface:IMixinConfigSourcePlain text description of the config source, can be as descriptive as necessary to help the user identify the source, for example could be the full path to the source item, or something more descriptive.- Specified by:
getDescriptionin interfaceIMixinConfigSource
-
getName
public java.lang.String getName()
Get the name of this container
-
setAttribute
public ContainerHandleVirtual setAttribute(java.lang.String key, java.lang.String value)
Set a virtual attribute on this virtual container- Parameters:
key- attribute keyvalue- attribute value- Returns:
- fluent interface
-
add
public ContainerHandleVirtual add(IContainerHandle nested)
Add a nested container to this virtual container- Parameters:
nested- Nested container to add- Returns:
- fluent
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)
Description copied from interface:IContainerHandleRetrieve the value of attribute with the specified name, or null if not present- Specified by:
getAttributein interfaceIContainerHandle- Parameters:
name- attribute name- Returns:
- attribute value or null if not present
-
getNestedContainers
public java.util.Collection<IContainerHandle> getNestedContainers()
Description copied from interface:IContainerHandleGet 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:
getNestedContainersin interfaceIContainerHandle
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-