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

org.snapscript.studio.agent.local.LocalCommandLine Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.studio.agent.local;

import java.io.File;
import java.net.URI;
import java.util.List;
import java.util.jar.Manifest;

import org.snapscript.core.module.Path;
import org.snapscript.studio.agent.cli.CommandLine;
import org.snapscript.studio.agent.cli.CommandOption;

public class LocalCommandLine {

   private final CommandLine line;
   
   public LocalCommandLine(CommandLine line) {
      this.line = line;
   }
   
   public List getOptions(){
      return line.getOptions();
   }
   
   public boolean isDebug() {
      return (Boolean)line.getValue(LocalOption.VERBOSE.name);
   }
   
   public boolean isCheck() {
      return (Boolean)line.getValue(LocalOption.CHECK.name);
   }
   
   public boolean isWait() {
      return (Boolean)line.getValue(LocalOption.WAIT.name);
   }
   
   public Integer getPort() {
      return (Integer)line.getValue(LocalOption.PORT.name);
   }

   public File getDirectory() {
      return (File)line.getValue(LocalOption.DIRECTORY.name);
   }
   
   public List getClasspath() {
      return (List)line.getValue(LocalOption.CLASSPATH.name);
   }
   
   public Path getScript() {
      return (Path)line.getValue(LocalOption.SCRIPT.name);
   }

   public String getEvaluation() {
      return (String)line.getValue(LocalOption.EXPRESSION.name);
   }
   
   public URI getURI() {
      return (URI)line.getValue(LocalOption.URL.name);
   }
   
   public String getSystem() {
      return System.getProperty("os.name", "unknown");
   }

   public boolean isVersion() {
      return (Boolean)line.getValue(LocalOption.VERSION.name);
   }
   
   public String[] getArguments() {
      return line.getArguments();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy