public class DefaultRestartInitializer extends Object implements RestartInitializer
RestartInitializer that only enable initial restart when running a
 standard "main" method. Skips initialization when running "fat" jars (included
 exploded) or when running from a test.NONE| Constructor and Description | 
|---|
DefaultRestartInitializer()  | 
| Modifier and Type | Method and Description | 
|---|---|
URL[] | 
getInitialUrls(Thread thread)
Return the initial set of URLs for the  
Restarter or null if no
 initial restart is required. | 
protected URL[] | 
getUrls(Thread thread)
Return the URLs that should be used with initialization. 
 | 
protected boolean | 
isDevelopmentClassLoader(ClassLoader classLoader)
Returns whether the given  
classLoader is one that is typically used during
 development. | 
protected boolean | 
isMain(Thread thread)
Returns if the thread is for a main invocation. 
 | 
protected boolean | 
isMainThread(Thread thread)
Returns whether the given  
thread is considered to be the main thread. | 
public URL[] getInitialUrls(Thread thread)
RestartInitializerRestarter or null if no
 initial restart is required.getInitialUrls in interface RestartInitializerthread - the source threadnullprotected boolean isMain(Thread thread)
checks the name of the thread and the context classloader.thread - the thread to checktrue if the thread is a main invocationisMainThread(java.lang.Thread), 
isDevelopmentClassLoader(ClassLoader)protected boolean isMainThread(Thread thread)
thread is considered to be the main thread.thread - the thread to checktrue if it's the main thread, otherwise falseprotected boolean isDevelopmentClassLoader(ClassLoader classLoader)
classLoader is one that is typically used during
 development.classLoader - the ClassLoader to checktrue if it's a ClassLoader typically used during development,
 otherwise false