
org.snapscript.studio.agent.runtime.VersionValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-agent Show documentation
Show all versions of snap-agent Show documentation
Dynamic scripting for the JVM
The newest version!
package org.snapscript.studio.agent.runtime;
import static org.snapscript.studio.agent.runtime.RuntimeAttribute.VERSION;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
public class VersionValue extends ManifestValue {
private static final String IMPLEMENTATION_VERSION = "Implementation-Version";
private static final String DEFAULT_VERSION = "1.0";
@Override
public String getName() {
return VERSION.name;
}
@Override
public String getValue() {
Attributes.Name key = new Attributes.Name(IMPLEMENTATION_VERSION);
Manifest manifest = getManifest();
String version = (String)manifest.getMainAttributes().get(key);
return version == null ? DEFAULT_VERSION : version;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy