terp - the Codemesh Modular
Template Interpreter v1.3.337

com.codemesh.terp.eval.executors
Class ShellExecutor

java.lang.Object
  extended by com.codemesh.terp.api.Executor.AbstractExecutor<ProcessExecutor.Result>
      extended by com.codemesh.terp.eval.executors.ProcessExecutor
          extended by com.codemesh.terp.eval.executors.ShellExecutor
All Implemented Interfaces:
Executor<ProcessExecutor.Result>
Direct Known Subclasses:
Ant.AntExecutor, BatchExecutor, CodegenExecutor, Cpp.CppExecutor, Csharp.CsharpExecutor, Lib.LibExecutor, ManifestTool.ManifestToolExecutor, Reg.RegExecutor, VisualBasic.VbExecutor, Xargs.XargsExecutor

public class ShellExecutor
extends ProcessExecutor

An executor that runs commands in a shell.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.codemesh.terp.eval.executors.ProcessExecutor
ProcessExecutor.Result
 
Nested classes/interfaces inherited from interface com.codemesh.terp.api.Executor
Executor.AbstractExecutor<T>, Executor.ForMethod
 
Field Summary
protected  java.util.Map<java.lang.String,java.lang.String> theAddedEnvSettings
           
protected  java.lang.String theExecFlag
           
protected  java.util.Set<java.lang.String> theRemovedEnvSettings
           
protected  java.io.File theShell
           
protected static Converter<java.lang.String> TO_STRING
           
 
Fields inherited from class com.codemesh.terp.eval.executors.ProcessExecutor
EOL, IS_WINDOWS, logger, theEnvironment, theExecutable, theTerpCmdVar, theWorkingDir, TO_FILE, TO_LIST
 
Constructor Summary
ShellExecutor()
           
 
Method Summary
 void addToEnvironment(java.lang.String key, java.lang.String value)
           
 java.lang.String[] createEnvironment(java.util.Map<java.lang.String,java.lang.Object> map)
           
 java.lang.String getExecFlag()
           
 java.io.File getShell()
           
 java.lang.String[] marshallArguments(java.util.List<java.lang.Object> args)
           
 void removeFromEnvironment(java.lang.String key)
           
 void setExecFlag(java.lang.String flag)
           
 void setShell(java.io.File shell)
           
static ShellExecutor shellFromFile(java.io.File shell)
           
static ShellExecutor shellFromMap(java.util.Map<java.lang.String,java.lang.Object> map)
           
static ShellExecutor shellFromMap(ShellExecutor result, java.util.Map<java.lang.String,java.lang.Object> map)
           
static ShellExecutor shellFromString(java.lang.String shell)
           
 
Methods inherited from class com.codemesh.terp.eval.executors.ProcessExecutor
appendToEnvironment, execute, execute, fromFile, fromMap, fromMap, fromString, getEnvironment, getExecutable, getWorkingDir, matches, setEnvironment, setExecutable, setWorkingDir
 
Methods inherited from class com.codemesh.terp.api.Executor.AbstractExecutor
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theShell

protected java.io.File theShell

theExecFlag

protected java.lang.String theExecFlag

theAddedEnvSettings

protected java.util.Map<java.lang.String,java.lang.String> theAddedEnvSettings

theRemovedEnvSettings

protected java.util.Set<java.lang.String> theRemovedEnvSettings

TO_STRING

protected static final Converter<java.lang.String> TO_STRING
Constructor Detail

ShellExecutor

public ShellExecutor()
Method Detail

setShell

public void setShell(java.io.File shell)

getShell

public java.io.File getShell()

setExecFlag

public void setExecFlag(java.lang.String flag)

getExecFlag

public java.lang.String getExecFlag()

shellFromString

public static ShellExecutor shellFromString(java.lang.String shell)

shellFromFile

public static ShellExecutor shellFromFile(java.io.File shell)

shellFromMap

public static ShellExecutor shellFromMap(java.util.Map<java.lang.String,java.lang.Object> map)

shellFromMap

public static ShellExecutor shellFromMap(ShellExecutor result,
                                         java.util.Map<java.lang.String,java.lang.Object> map)

addToEnvironment

public void addToEnvironment(java.lang.String key,
                             java.lang.String value)

removeFromEnvironment

public void removeFromEnvironment(java.lang.String key)

createEnvironment

public java.lang.String[] createEnvironment(java.util.Map<java.lang.String,java.lang.Object> map)

marshallArguments

public java.lang.String[] marshallArguments(java.util.List<java.lang.Object> args)
Overrides:
marshallArguments in class ProcessExecutor

terp - the Codemesh Modular
Template Interpreter v1.3.337

Copyright © 2008-2016 by Codemesh, Inc. All Rights Reserved.