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
All Methods Static Methods Instance Methods Concrete Methods 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 presentjava.lang.Stringget(java.util.jar.Attributes.Name 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 file
-
-
-
Method Detail
-
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
-
get
public final java.lang.String get(java.util.jar.Attributes.Name 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
public static MainAttributes of(java.io.File jar)
Create a MainAttributes instance for the supplied jar file- Parameters:
jar- jar file- Returns:
- MainAttributes instance
-
of
public static MainAttributes of(java.net.URI uri)
Create a MainAttributes instance for the supplied jar file- Parameters:
uri- jar file location- Returns:
- MainAttributes instance
-
-