All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.studio.agent.runtime.ManifestValue Maven / Gradle / Ivy

The newest version!
package org.snapscript.studio.agent.runtime;

import java.io.InputStream;
import java.util.jar.Manifest;

public abstract class ManifestValue implements RuntimeValue {

   private static final String MANIFEST_FILE = "META-INF/MANIFEST.MF";

   protected Manifest getManifest() {
      try {
         InputStream resource = VersionValue.class.getResourceAsStream(MANIFEST_FILE);

         if(resource == null) {
            resource = VersionValue.class.getResourceAsStream("/" + MANIFEST_FILE);
         }
         return new Manifest(resource);
      } catch(Exception e) {
         throw new IllegalStateException("Could not read manifest file", e);
      }
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy