public class DefaultGroovyStaticMethods
extends java.lang.Object
| Constructor and Description |
|---|
DefaultGroovyStaticMethods() |
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
createTempDir(java.io.File self) |
static java.io.File |
createTempDir(java.io.File self,
java.lang.String prefix,
java.lang.String suffix) |
static long |
currentTimeSeconds(java.lang.System self)
Get the current time in seconds
|
static java.util.ResourceBundle |
getBundle(java.util.ResourceBundle self,
java.lang.String bundleName)
Works exactly like ResourceBundle.getBundle(String).
|
static java.util.ResourceBundle |
getBundle(java.util.ResourceBundle self,
java.lang.String bundleName,
java.util.Locale locale)
Works exactly like ResourceBundle.getBundle(String, Locale).
|
static java.util.regex.Matcher |
getLastMatcher(java.util.regex.Matcher self)
Get the last hidden matcher that the system used to do a match.
|
static java.util.Date |
parse(java.util.Date self,
java.lang.String format,
java.lang.String input)
Deprecated.
|
static java.util.Date |
parse(java.util.Date self,
java.lang.String format,
java.lang.String input,
java.util.TimeZone zone)
Deprecated.
|
static java.util.Date |
parseToStringDate(java.util.Date self,
java.lang.String dateToString)
Deprecated.
|
static void |
sleep(java.lang.Object self,
long milliseconds)
Sleep for so many milliseconds, even if interrupted.
|
static void |
sleep(java.lang.Object self,
long milliseconds,
Closure onInterrupt)
Sleep for so many milliseconds, using a given closure for interrupt processing.
|
static java.lang.Thread |
start(java.lang.Thread self,
Closure closure)
Start a Thread with the given closure as a Runnable instance.
|
static java.lang.Thread |
start(java.lang.Thread self,
java.lang.String name,
Closure closure)
Start a Thread with a given name and the given closure
as a Runnable instance.
|
static java.lang.Thread |
startDaemon(java.lang.Thread self,
Closure closure)
Start a daemon Thread with the given closure as a Runnable instance.
|
static java.lang.Thread |
startDaemon(java.lang.Thread self,
java.lang.String name,
Closure closure)
Start a daemon Thread with a given name and the given closure as
a Runnable instance.
|
public static java.lang.Thread start(java.lang.Thread self,
Closure closure)
self - placeholder variable used by Groovy categories; ignored for default static methodsclosure - the Runnable closurepublic static java.lang.Thread start(java.lang.Thread self,
java.lang.String name,
Closure closure)
self - placeholder variable used by Groovy categories; ignored for default static methodsname - the name to give the threadclosure - the Runnable closurepublic static java.lang.Thread startDaemon(java.lang.Thread self,
Closure closure)
self - placeholder variable used by Groovy categories; ignored for default static methodsclosure - the Runnable closurepublic static java.lang.Thread startDaemon(java.lang.Thread self,
java.lang.String name,
Closure closure)
self - placeholder variable used by Groovy categories; ignored for default static methodsname - the name to give the threadclosure - the Runnable closurepublic static java.util.regex.Matcher getLastMatcher(java.util.regex.Matcher self)
self - placeholder variable used by Groovy categories; ignored for default static methodspublic static void sleep(java.lang.Object self,
long milliseconds)
self - placeholder variable used by Groovy categories; ignored for default static methodsmilliseconds - the number of milliseconds to sleeppublic static void sleep(java.lang.Object self,
long milliseconds,
Closure onInterrupt)
self - placeholder variable used by Groovy categories; ignored for default static methodsmilliseconds - the number of milliseconds to sleeponInterrupt - interrupt handler, InterruptedException is passed to the Closure
as long as it returns false, the sleep continues@Deprecated
public static java.util.Date parse(java.util.Date self,
java.lang.String format,
java.lang.String input)
throws java.text.ParseException
java.text.ParseException@Deprecated
public static java.util.Date parse(java.util.Date self,
java.lang.String format,
java.lang.String input,
java.util.TimeZone zone)
throws java.text.ParseException
java.text.ParseException@Deprecated
public static java.util.Date parseToStringDate(java.util.Date self,
java.lang.String dateToString)
throws java.text.ParseException
java.text.ParseExceptionpublic static java.util.ResourceBundle getBundle(java.util.ResourceBundle self,
java.lang.String bundleName)
self - placeholder variable used by Groovy categories; ignored for default static methodsbundleName - the name of the bundle.ResourceBundle.getBundle(java.lang.String)public static java.util.ResourceBundle getBundle(java.util.ResourceBundle self,
java.lang.String bundleName,
java.util.Locale locale)
self - placeholder variable used by Groovy categories; ignored for default static methodsbundleName - the name of the bundle.locale - the specific localeResourceBundle.getBundle(java.lang.String, java.util.Locale)public static java.io.File createTempDir(java.io.File self)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.File createTempDir(java.io.File self,
java.lang.String prefix,
java.lang.String suffix)
throws java.io.IOException
java.io.IOExceptionpublic static long currentTimeSeconds(java.lang.System self)
self - placeholder variable used by Groovy categories; ignored for default static methodsSystem.currentTimeMillis()