Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and description |
---|---|
Object |
evaluate(String expression) A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope |
Object |
evaluate(File file) A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope |
Binding |
getBinding() |
Object |
getProperty(String property) |
Object |
invokeMethod(String name, Object args) Invoke a method (or closure in the binding) defined. |
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. |
void |
printf(String format, Object value) Prints a formatted string using the specified format string and argument. |
void |
printf(String format, Object[] values) Prints a formatted string using the specified format string and arguments. |
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. |
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. |
Object |
run() The main instance method of a script which has variables in scope as defined by the current Binding instance. |
void |
run(File file, String[] arguments) A helper method to allow scripts to be run taking command line arguments |
void |
setBinding(Binding binding) |
void |
setProperty(String property, Object newValue) |
Methods inherited from class | Name |
---|---|
class GroovyObjectSupport |
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope
expression
- is the Groovy script expression to evaluateA helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope
file
- is the Groovy script to evaluateInvoke a method (or closure in the binding) defined.
name
- method to callargs
- arguments to pass to the methodPrints 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.
Prints a formatted string using the specified format string and argument.
format
- the format to followvalue
- the value to be formattedPrints a formatted string using the specified format string and arguments.
format
- the format to followvalues
- an array of values to be formattedPrints 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.
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.
The main instance method of a script which has variables in scope as defined by the current Binding instance.
A helper method to allow scripts to be run taking command line arguments
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.