public class ClassLeakingRule extends java.lang.Object implements IRule
Modifier and Type | Field and Description |
---|---|
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
private static java.lang.String |
COUNT_AGGREGATOR_ID |
static TypedCollectionResult<ClassEntry> |
LOADED_CLASSES |
static TypedPreference<IQuantity> |
MAX_NUMBER_OF_CLASSES_TO_REPORT |
static TypedResult<IMCType> |
MOST_LOADED_CLASS |
static TypedResult<IQuantity> |
MOST_LOADED_CLASS_TIMES |
private static java.util.Map<java.lang.String,RulesToolkit.EventAvailability> |
REQUIRED_EVENTS |
private static java.util.List<TypedResult<?>> |
RESULT_ATTRIBUTES |
private static java.lang.String |
RESULT_ID |
static TypedPreference<IQuantity> |
WARNING_LIMIT |
Constructor and Description |
---|
ClassLeakingRule() |
Modifier and Type | Method and Description |
---|---|
private static IItemFilter |
createClassAttributeFilter(IAttribute<IMCType> attribute,
java.util.Map<java.lang.String,ClassEntry> entries) |
java.util.concurrent.RunnableFuture<IResult> |
createEvaluation(IItemCollection items,
IPreferenceValueProvider preferenceValueProvider,
IResultValueProvider dependencyResults)
Gets a future representing the result of the evaluation of this rule.
|
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) |
private java.util.Map<java.lang.String,ClassEntry> |
extractClassEntriesFromQuery(IItemCollection items,
IItemQuery query) |
java.util.Collection<TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
java.lang.String |
getId() |
java.lang.String |
getName() |
java.util.Map<java.lang.String,RulesToolkit.EventAvailability> |
getRequiredEvents() |
private IResult |
getResult(IItemCollection items,
IPreferenceValueProvider valueProvider,
IResultValueProvider dependencyResults) |
java.util.Collection<TypedResult<?>> |
getResults()
Gets information about which results may be part of an
IResult instance. |
java.lang.String |
getTopic() |
private static final java.lang.String RESULT_ID
private static final java.lang.String COUNT_AGGREGATOR_ID
public static final TypedPreference<IQuantity> WARNING_LIMIT
public static final TypedPreference<IQuantity> MAX_NUMBER_OF_CLASSES_TO_REPORT
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
public static final TypedCollectionResult<ClassEntry> LOADED_CLASSES
public static final TypedResult<IMCType> MOST_LOADED_CLASS
public static final TypedResult<IQuantity> MOST_LOADED_CLASS_TIMES
private static final java.util.List<TypedResult<?>> RESULT_ATTRIBUTES
private static final java.util.Map<java.lang.String,RulesToolkit.EventAvailability> REQUIRED_EVENTS
public java.lang.String getId()
public java.lang.String getTopic()
public java.lang.String getName()
public java.util.Map<java.lang.String,RulesToolkit.EventAvailability> getRequiredEvents()
getRequiredEvents
in interface IRule
RulesToolkit.EventAvailability
this rule
requires for that event typeprivate IResult getResult(IItemCollection items, IPreferenceValueProvider valueProvider, IResultValueProvider dependencyResults)
private static IItemFilter createClassAttributeFilter(IAttribute<IMCType> attribute, java.util.Map<java.lang.String,ClassEntry> entries)
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)
private java.util.Map<java.lang.String,ClassEntry> extractClassEntriesFromQuery(IItemCollection items, IItemQuery query)
public java.util.concurrent.RunnableFuture<IResult> createEvaluation(IItemCollection items, IPreferenceValueProvider preferenceValueProvider, IResultValueProvider dependencyResults)
IRule
createEvaluation
in interface IRule
items
- items to evaluatepreferenceValueProvider
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.dependencyResults
- Provider of results from rules evaluated prior to this rule and which this rule
explicitly depends on via a DependsOn
annotation. The attributes that will
be asked for from the provider will be provided by each dependant rule, e.g. via
public static constants.public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.util.Collection<TypedResult<?>> getResults()
IRule
IResult
instance.getResults
in interface IRule