Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.compiler
[Java] Class GrailsProjectWatcher

    java.lang.Object
      java.lang.Thread
          org.codehaus.groovy.grails.compiler.DirectoryWatcher
              org.codehaus.groovy.grails.compiler.GrailsProjectWatcher

    public class GrailsProjectWatcher
    extends DirectoryWatcher

Watches a Grails projects and re-compiles sources when they change or fires events to the pluginManager.

Authors:
  Graeme Rocher

Since:
  2.0

Field Summary
`static java.lang.String` | `SPRING_LOADED_PLUGIN_CLASS`

Fields inherited from class DirectoryWatcher
SVN_DIR_NAME, extensions

Fields inherited from class java.lang.Thread
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY

Constructor Summary
`GrailsProjectWatcher(GrailsProjectCompiler compiler, GrailsPluginManager pluginManager)`

Method Summary
`protected boolean` | `fileIsReloadable(java.io.File file)`
`static void` | `firePendingClassChangeEvents(java.lang.Class updatedClass)` Fire any pending class change events
`static org.codehaus.groovy.control.MultipleCompilationErrorsException` | `getCurrentCompilationError()`
`static java.lang.Throwable` | `getCurrentReloadError()`
`static boolean` | `isActive()` Whether the watcher is active
`static boolean` | `isReloadInProgress()`
`static boolean` | `isReloadingAgentPresent()`
`void` | `run()`
`static void` | `setCurrentReloadError(java.lang.Throwable currentReloadError)`
`void` | `setPluginManager(GrailsPluginManager pluginManager)`
`static void` | `setReloadExcludes(java.util.List reloadExcludes)`
`static void` | `setReloadIncludes(java.util.List reloadIncludes)`

Methods inherited from class DirectoryWatcher
addListener, addWatchDirectory, addWatchDirectory, addWatchFile, run, setActive, setSleepTime

Methods inherited from class java.lang.Thread
java.lang.Thread#run(), java.lang.Thread#toString(), java.lang.Thread#isInterrupted(), java.lang.Thread#currentThread(), java.lang.Thread#getName(), java.lang.Thread#getThreadGroup(), java.lang.Thread#getStackTrace(), java.lang.Thread#dumpStack(), java.lang.Thread#setPriority(int), java.lang.Thread#setDaemon(boolean), java.lang.Thread#start(), java.lang.Thread#yield(), java.lang.Thread#sleep(long), java.lang.Thread#sleep(long, int), java.lang.Thread#stop(), java.lang.Thread#stop(java.lang.Throwable), java.lang.Thread#interrupt(), java.lang.Thread#interrupted(), java.lang.Thread#destroy(), java.lang.Thread#isAlive(), java.lang.Thread#suspend(), java.lang.Thread#resume(), java.lang.Thread#getPriority(), java.lang.Thread#setName(java.lang.String), java.lang.Thread#activeCount(), java.lang.Thread#enumerate([Ljava.lang.Thread;), java.lang.Thread#countStackFrames(), java.lang.Thread#join(), java.lang.Thread#join(long, int), java.lang.Thread#join(long), java.lang.Thread#isDaemon(), java.lang.Thread#checkAccess(), java.lang.Thread#getContextClassLoader(), java.lang.Thread#setContextClassLoader(java.lang.ClassLoader), java.lang.Thread#holdsLock(java.lang.Object), java.lang.Thread#getAllStackTraces(), java.lang.Thread#getId(), java.lang.Thread#getState(), java.lang.Thread#setDefaultUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler), java.lang.Thread#getDefaultUncaughtExceptionHandler(), java.lang.Thread#getUncaughtExceptionHandler(), java.lang.Thread#setUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler), java.lang.Thread#wait(), java.lang.Thread#wait(long), java.lang.Thread#wait(long, int), java.lang.Thread#equals(java.lang.Object), java.lang.Thread#hashCode(), java.lang.Thread#getClass(), java.lang.Thread#notify(), java.lang.Thread#notifyAll()

Field Detail

### SPRING_LOADED_PLUGIN_CLASS

    public static final java.lang.String SPRING_LOADED_PLUGIN_CLASS

Constructor Detail

### GrailsProjectWatcher

    public GrailsProjectWatcher(GrailsProjectCompiler compiler, GrailsPluginManager pluginManager)

Method Detail

### fileIsReloadable

    protected boolean fileIsReloadable(java.io.File file)

### firePendingClassChangeEvents

    public static void firePendingClassChangeEvents(java.lang.Class updatedClass)

  Fire any pending class change events
  Parameters:
    `updatedClass` - The class to update

### getCurrentCompilationError

    public static org.codehaus.groovy.control.MultipleCompilationErrorsException getCurrentCompilationError()

### getCurrentReloadError

    public static java.lang.Throwable getCurrentReloadError()

### isActive

    public static boolean isActive()

  Whether the watcher is active
  Returns:
    true if it is

### isReloadInProgress

    public static boolean isReloadInProgress()

### isReloadingAgentPresent

    public static boolean isReloadingAgentPresent()

### run

    @Override
    public void run()

### setCurrentReloadError

    public static void setCurrentReloadError(java.lang.Throwable currentReloadError)

### setPluginManager

    public void setPluginManager(GrailsPluginManager pluginManager)

### setReloadExcludes

    public static void setReloadExcludes(java.util.List reloadExcludes)

### setReloadIncludes

    public static void setReloadIncludes(java.util.List reloadIncludes)

Groovy Documentation