Interface Configuration


  • 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:

  • If at least one exclude filter matches a class it will not be instrumented.
  • If none of the exclude filters match a class and at least one of the include filters matches a class it will be instrumented.

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");
     }
   });
 
Since:
1.2
Author:
Jevgeni Kabanov (ekabanov@zeroturnaround.com)
See Also:
ConfigurationFactory, Integration, Reloader, Logger, Plugin