Class MainAttributes
java.lang.Object
org.spongepowered.asm.launch.platform.MainAttributes
public final class MainAttributes
extends java.lang.Object
"Main" attribute cache for a URI container, mainly to avoid constantly
opening jar files just to read odd values out of the manifest.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.jar.AttributesattributesManifest from jar -
Method Summary
Modifier and Type Method Description java.lang.Stringget(java.lang.String name)Retrieve the value of attribute with the specified name, or null if not presentstatic MainAttributesof(java.io.File jar)Create a MainAttributes instance for the supplied jar filestatic MainAttributesof(java.net.URI uri)Create a MainAttributes instance for the supplied jar fileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
attributes
protected final java.util.jar.Attributes attributesManifest from jar
-
-
Method Details
-
get
public final java.lang.String get(java.lang.String name)Retrieve the value of attribute with the specified name, or null if not present- Parameters:
name- attribute name- Returns:
- attribute value or null if not present
-
of
Create a MainAttributes instance for the supplied jar file- Parameters:
jar- jar file- Returns:
- MainAttributes instance
-
of
Create a MainAttributes instance for the supplied jar file- Parameters:
uri- jar file location- Returns:
- MainAttributes instance
-