public interface Configuration
This class manages JRebel 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,
Resource classResource) {
return classResource.toURL().getPath().contains("mylibrary.jar");
}
});
ConfigurationFactory,
Integration,
Reloader,
Logger,
Plugin| Modifier and Type | Method and Description |
|---|---|
void |
addExcludeFilter(ClassLoader cl)
Adds an exclude filter for the entire class loader (including plug-ins).
|
void |
addExcludeFilter(ClassLoaderFilter classLoaderFilter)
Adds an exclude filter for entire class loaders (including plug-ins).
|
void |
addExcludeFilter(String classLoaderClassName)
Adds an exclude filter for the entire class loader (including plug-ins).
|
void |
addExcludeManagedFilter(ClassFilter classFilter)
Adds an exclude filter for managed classes.
|
void |
addExcludeManagedFilter(ClassIdentityFilter classFilter)
Adds an exclude filter for managed classes.
|
void |
addExcludeManagedFilter(ClassLoader cl)
Adds an exclude filter for managed classes.
|
void |
addIncludeManagedFilter(ClassFilter classFilter)
Adds an include filter for managed classes.
|
void |
addIncludeManagedFilter(ClassIdentityFilter classFilter)
Adds an include filter for managed classes.
|
void |
addIncludeManagedFilter(ClassLoader cl)
Adds an include filter for managed classes.
|
void |
clearManagedFilters()
Clears all currently used filters including the default ones.
|
boolean |
getBoolean(String key)
Gets the boolean value of a system property indicated by the specified key.
|
int |
getCheckInterval()
Advisable time between checks for updates in framework specific configuration
files.
|
Resource |
getClassResource(ClassLoader cl,
String classname)
Returns a JRebel Resource exactly as JRebel will load it.
|
String |
getProductName() |
String |
getProperty(String key)
Gets the system property indicated by the specified key.
|
boolean |
isClassLoaderExcluded(ClassLoader cl)
Returns whether the filters will deny the given class loader.
|
boolean |
isManagedClass(ClassLoader cl,
String classname,
Resource cr)
Returns whether the filters will allow the given class to be managed.
|
boolean |
isManagedClassExcluded(ClassLoader cl,
String classname)
Returns whether the filters will deny the given class to be managed.
|
boolean |
isPluginEnabled(String id)
Checks whether the given plugin is enabled.
|
String getProperty(String key)
jrebel.properties
is returned.key - the name of the system property.null if there is no property with that key.boolean getBoolean(String key)
jrebel.properties
is returned.key - the name of the system property.false if there is no property with that key.int getCheckInterval()
String getProductName()
boolean isPluginEnabled(String id)
id - plugin id (see Plugin.getId()).true if the given plugin is enabled.void clearManagedFilters()
void addExcludeFilter(ClassLoader cl)
void addExcludeFilter(String classLoaderClassName)
void addExcludeFilter(ClassLoaderFilter classLoaderFilter)
boolean isClassLoaderExcluded(ClassLoader cl)
void addIncludeManagedFilter(ClassLoader cl)
void addExcludeManagedFilter(ClassLoader cl)
void addIncludeManagedFilter(ClassIdentityFilter classFilter)
void addExcludeManagedFilter(ClassIdentityFilter classFilter)
void addIncludeManagedFilter(ClassFilter classFilter)
void addExcludeManagedFilter(ClassFilter classFilter)
boolean isManagedClass(ClassLoader cl, String classname, Resource cr)
ClassFilter and ClassIdentityFilter rules.boolean isManagedClassExcluded(ClassLoader cl, String classname)
ClassIdentityFilter rules.Resource getClassResource(ClassLoader cl, String classname)
isManagedClass(ClassLoader, String, Resource) returns false
then this method will return null.Copyright © 2017. All rights reserved.