|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Configuration
This class manages JavaRebel configuration.
To manage the classes that will be instrumented use the filter methods
addExcludeManagedFilter(ClassFilter) and addIncludeManagedFilter(ClassFilter).
If you need to override the default behavior (e.g. you don't need class files to be managed)
use clearManagedFilters() to disable the default filters. If you want to filter
classes by packages you can use PackageClassFilter.
The filter methods work as follows:
For example, if you want all classes in a particular JAR to be instrumented you can use a following filter:
ConfigurationFactory.getInstance()
.addIncludeManagedFilter(new ClassFilter() {
public boolean matches(ClassLoader cl, String className,
ClassResource classResource) {
return classResource.toURL().getPath().contains("mylibrary.jar");
}
});
To manage monitored directories use the method addMonitoredDir(File)
ConfigurationFactory,
Integration,
Reloader,
Logger,
Plugin| Field Summary | |
|---|---|
static java.lang.String |
SYSPROP_MANAGED_PACKAGES
This system property should be set to a comma-separated list of Java packages. |
static java.lang.String |
SYSPROP_MANAGED_PACKAGES_EXCLUDE
This system property should be set to a comma-separated list of Java packages. |
static java.lang.String |
SYSPROP_MANAGED_PACKAGES_INCLUDE
This system property should be set to a comma-separated list of Java packages. |
static java.lang.String |
SYSPROP_MONITORED_DIRS
This system property should be set to a comma-separated list of directories. |
| Method Summary | |
|---|---|
void |
addExcludeManagedFilter(ClassFilter classFilter)
Adds an exclude filter for managed classes. |
void |
addIncludeManagedFilter(ClassFilter classFilter)
Adds an include filter for managed classes. |
void |
addMonitoredDir(java.io.File dir)
Adds a monitored directory. |
void |
clearManagedFilters()
Clears all currently used filters including the default ones. |
java.io.File[] |
getMonitoredDirs()
Returns all currently monitored directories. |
boolean |
isManagedClass(java.lang.ClassLoader cl,
java.lang.String classname,
ClassResource cr)
Returns whether the filters will allow the given class to be managed. |
| Field Detail |
|---|
static final java.lang.String SYSPROP_MANAGED_PACKAGES
-Drebel.packages=com.mycompany.mypackage,com.thirdparty.theirpackage.
static final java.lang.String SYSPROP_MANAGED_PACKAGES_EXCLUDE
-Drebel.packages_exclude=com.mycompany.mypackage,com.thirdparty.theirpackage.
static final java.lang.String SYSPROP_MANAGED_PACKAGES_INCLUDE
-Drebel.packages_include=com.mycompany.mypackage,com.thirdparty.theirpackage.
static final java.lang.String SYSPROP_MONITORED_DIRS
-Drebel.dirs=c:/workspace/myproject/bin;c:/workspace/mylibrary/bin.
| Method Detail |
|---|
void clearManagedFilters()
void addIncludeManagedFilter(ClassFilter classFilter)
void addExcludeManagedFilter(ClassFilter classFilter)
boolean isManagedClass(java.lang.ClassLoader cl,
java.lang.String classname,
ClassResource cr)
void addMonitoredDir(java.io.File dir)
java.io.File[] getMonitoredDirs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||