Package groovy.lang

Class Script

    • Constructor Detail

      • Script

        protected Script()
      • Script

        protected Script​(Binding binding)
    • Method Detail

      • getBinding

        public Binding getBinding()
      • setBinding

        public void setBinding​(Binding binding)
      • run

        public abstract Object run()
        The main instance method of a script which has variables in scope as defined by the current Binding instance.
      • println

        public void println()
        Prints a newline to the current 'out' variable which should be a PrintWriter or at least have a println() method defined on it. If there is no 'out' property then print to standard out.
      • print

        public void print​(Object value)
        Prints the value to the current 'out' variable which should be a PrintWriter or at least have a print() method defined on it. If there is no 'out' property then print to standard out.
      • println

        public void println​(Object value)
        Prints the value and a newline to the current 'out' variable which should be a PrintWriter or at least have a println() method defined on it. If there is no 'out' property then print to standard out.
      • printf

        public void printf​(String format,
                           Object value)
        Prints a formatted string using the specified format string and argument.
        Parameters:
        format - the format to follow
        value - the value to be formatted
      • printf

        public void printf​(String format,
                           Object[] values)
        Prints a formatted string using the specified format string and arguments.
        Parameters:
        format - the format to follow
        values - an array of values to be formatted