Class ExecutionLocal
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.common.ExecutionLocal
-
public class ExecutionLocal extends java.lang.ObjectProvides access to execution global information that is available via registered tracers for instances that do not have references to the execution visitor.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description ExecutionLocal()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.LocaledoCurrentLocale(java.util.Locale locale)Changes and returns the current locale for this thread used during evaluation.static java.text.CollatorgetCurrentCollator()Returns the collator forgetCurrentLocale().static ConfigurationgetCurrentConfiguration()Returns the current (top-level) configuration known during execution.static java.util.LocalegetCurrentLocale()Returns the current locale for this thread used during evaluation.private static RuntimeEnvironment<?,?>getCurrentRuntimeEnvironment()Returns the current runtime environment for this thread.static ITracergetCurrentTracer()Returns the current tracer for this thread.static TypeRegistrygetCurrentTypeRegistry()Returns the current type registry for this thread.static java.util.LocalesetCurrentLocale(java.util.Locale locale)Changes and returns the current locale for this thread used during evaluation.
-
-
-
Method Detail
-
getCurrentConfiguration
public static Configuration getCurrentConfiguration()
Returns the current (top-level) configuration known during execution.- Returns:
- the current configuration (may be null if unknown)
-
getCurrentLocale
public static java.util.Locale getCurrentLocale()
Returns the current locale for this thread used during evaluation.- Returns:
- the current locale
-
doCurrentLocale
private static java.util.Locale doCurrentLocale(java.util.Locale locale)
Changes and returns the current locale for this thread used during evaluation.- Parameters:
locale- the new locale (ignored if null, then only the current locale is returned)- Returns:
- the current locale (after a potential change)
-
getCurrentTracer
public static ITracer getCurrentTracer()
Returns the current tracer for this thread.- Returns:
- the current tracer (may be null)
-
getCurrentTypeRegistry
public static TypeRegistry getCurrentTypeRegistry()
Returns the current type registry for this thread.- Returns:
- the current type registry
-
getCurrentRuntimeEnvironment
private static RuntimeEnvironment<?,?> getCurrentRuntimeEnvironment()
Returns the current runtime environment for this thread.- Returns:
- the current runtime environment
-
setCurrentLocale
public static java.util.Locale setCurrentLocale(java.util.Locale locale)
Changes and returns the current locale for this thread used during evaluation.- Parameters:
locale- the new locale (ignored if null)- Returns:
- the new locale
-
getCurrentCollator
public static java.text.Collator getCurrentCollator()
Returns the collator forgetCurrentLocale().- Returns:
- the collator
-
-