Class ClassLeakingRule

  • All Implemented Interfaces:
    IRule

    public final class ClassLeakingRule
    extends java.lang.Object
    implements IRule
    This rule looks at the loaded classes to try to figure out if multiple classes with the same name has been loaded. Note that this rule can get fairly expensive if you have load events with many (thousands) of unique classes.
    • Constructor Detail

      • ClassLeakingRule

        public ClassLeakingRule()
    • Method Detail

      • diff

        private java.util.Map<java.lang.String,​ClassEntry> diff​(java.util.Map<java.lang.String,​ClassEntry> entriesLoad,
                                                                      java.util.Map<java.lang.String,​ClassEntry> entriesUnload)
      • evaluate

        public java.util.concurrent.RunnableFuture<Result> evaluate​(IItemCollection items,
                                                                    IPreferenceValueProvider valueProvider)
        Description copied from interface: IRule
        Gets a future representing the result of the evaluation of this rule. Running the RunnableFuture is the responsibility of the caller of this method, not the implementation.
        Specified by:
        evaluate in interface IRule
        Parameters:
        items - items to evaluate
        valueProvider - Provider of configuration values used for evaluation. The attributes that will be asked for from the provider should be provided by IRule.getConfigurationAttributes().
        Returns:
        a RunnableFuture that when run will return the evaluation result
      • getConfigurationAttributes

        public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
        Description copied from interface: IRule
        Gets information about which attributes may be configured during rule evaluation.
        Specified by:
        getConfigurationAttributes in interface IRule
        Returns:
        a list of configuration attributes
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface IRule
        Returns:
        a unique id for this rule implementation
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface IRule
        Returns:
        a human readable name for this rule
      • getTopic

        public java.lang.String getTopic()
        Specified by:
        getTopic in interface IRule
        Returns:
        the topic for this rule, may be null