Class Java

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, Serializable, Comparable

    public class Java
    extends AbstractStandalone
    Calls the main method of a Java class.

    Valid options are:

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: Java
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -cmd <java.lang.String> (property: command)
        The command to run, Java classname with options.
        default: adams.core.SystemInfo
     
    -placeholder <boolean> (property: commandContainsPlaceholder)
        Set this to true to enable automatic placeholder expansion for the command 
        string.
        default: false
     
    -variable <boolean> (property: commandContainsVariable)
        Set this to true to enable automatic variable expansion for the command 
        string.
        default: false
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Command

        protected String m_Command
        the command to run.
      • m_CommandContainsPlaceholder

        protected boolean m_CommandContainsPlaceholder
        whether the replace string contains a placeholder, which needs to be expanded first.
      • m_CommandContainsVariable

        protected boolean m_CommandContainsVariable
        whether the replace string contains a variable, which needs to be expanded first.
    • Constructor Detail

      • Java

        public Java()
    • Method Detail

      • setCommand

        public void setCommand​(String value)
        Sets the command to run.
        Parameters:
        value - the command
      • getCommand

        public String getCommand()
        Returns the command to run.
        Returns:
        the command
      • commandTipText

        public String commandTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCommandContainsPlaceholder

        public void setCommandContainsPlaceholder​(boolean value)
        Sets whether the command string contains a placeholder which needs to be expanded first.
        Parameters:
        value - true if command string contains a placeholder
      • getCommandContainsPlaceholder

        public boolean getCommandContainsPlaceholder()
        Returns whether the command string contains a placeholder which needs to be expanded first.
        Returns:
        true if command string contains a placeholder
      • commandContainsPlaceholderTipText

        public String commandContainsPlaceholderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCommandContainsVariable

        public void setCommandContainsVariable​(boolean value)
        Sets whether the command string contains a variable which needs to be expanded first.
        Parameters:
        value - true if command string contains a variable
      • getCommandContainsVariable

        public boolean getCommandContainsVariable()
        Returns whether the command string contains a variable which needs to be expanded first.
        Returns:
        true if command string contains a variable
      • commandContainsVariableTipText

        public String commandContainsVariableTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message