Top Fields Constructors Methods
groovy.lang

public final Class GroovySystem

extends Object
Class Inheritance
Imports
org.apache.groovy.plugin.GroovyRunner, .GroovyRunnerRegistry, org.codehaus.groovy.GroovyBugError, org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl, org.codehaus.groovy.util.ReferenceBundle, .ReleaseInfo, java.util.Map

Field Summary

Modifier and TypeField and Description
private static boolean
private static final MetaClassRegistry
META_CLASS_REGISTRY

Reference to the MetaClass Registry to be used by the Groovy run-time system to map classes to MetaClasses

public static final Map<String, GroovyRunner>
RUNNER_REGISTRY

Reference to the Runtime Registry to be used by the Groovy run-time system to find classes capable of running scripts

private static final boolean
USE_REFLECTION

If true then the MetaClass will only use reflection for method dispatch, property access, etc.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static MetaClassRegistry
public static String
getShortVersion()

Returns the major and minor part of the groovy version excluding the point/patch part of the version.

public static String
getVersion()

Returns the groovy version

public static boolean
public static boolean
isUseReflection()

Deprecated
public static void
setKeepJavaMetaClasses(boolean keepJavaMetaClasses)

public static void
stopThreadedReferenceManager()

This method can be used to ensure that no threaded created by a reference manager will be active.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keepJavaMetaClassesback to summary
private static boolean keepJavaMetaClasses
META_CLASS_REGISTRYback to summary
private static final MetaClassRegistry META_CLASS_REGISTRY

Reference to the MetaClass Registry to be used by the Groovy run-time system to map classes to MetaClasses

RUNNER_REGISTRYback to summary
public static final Map<String, GroovyRunner> RUNNER_REGISTRY

Deprecated

use GroovyRunnerRegistry

Reference to the Runtime Registry to be used by the Groovy run-time system to find classes capable of running scripts

Annotations
@Deprecated
USE_REFLECTIONback to summary
private static final boolean USE_REFLECTION

Deprecated

If true then the MetaClass will only use reflection for method dispatch, property access, etc.

Annotations
@Deprecated

Constructor Detail

GroovySystemback to summary
private GroovySystem()

Method Detail

getMetaClassRegistryback to summary
public static MetaClassRegistry getMetaClassRegistry()
getShortVersionback to summary
public static String getShortVersion()

Returns the major and minor part of the groovy version excluding the point/patch part of the version. E.g. 3.0.0, 3.0.0-SNAPSHOT, 3.0.0-rc-1 all have 3.0 as the short version.

Since
3.0.1
getVersionback to summary
public static String getVersion()

Returns the groovy version

isKeepJavaMetaClassesback to summary
public static boolean isKeepJavaMetaClasses()
isUseReflectionback to summary
public static boolean isUseReflection()

Deprecated

Annotations
@Deprecated
setKeepJavaMetaClassesback to summary
public static void setKeepJavaMetaClasses(boolean keepJavaMetaClasses)
stopThreadedReferenceManagerback to summary
public static void stopThreadedReferenceManager()

This method can be used to ensure that no threaded created by a reference manager will be active. This is useful if the Groovy runtime itself is loaded through a class loader which should be disposed off. Without calling this method and if a threaded reference manager is active the class loader cannot be unloaded! Per default no threaded manager will be used.

Since
1.6