Package net.sourceforge.pmd.lang.metrics
Class BasicProjectMemoizer<T extends QualifiableNode,O extends QualifiableNode>
- java.lang.Object
-
- net.sourceforge.pmd.lang.metrics.BasicProjectMemoizer<T,O>
-
- Type Parameters:
T
- Type of type declaration nodes of the languageO
- Type of operation declaration nodes of the language
- All Implemented Interfaces:
ProjectMemoizer<T,O>
@Deprecated public abstract class BasicProjectMemoizer<T extends QualifiableNode,O extends QualifiableNode> extends Object implements ProjectMemoizer<T,O>
Deprecated.See package descriptionSimple implementation of a project memoizer. Memoizers are accessible in constant time, provided the QualifiedName's hashCode is well distributed.This implementation takes care of recollecting irrelevant memoizers by storing them in
WeakHashMap
.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Constructor Summary
Constructors Constructor Description BasicProjectMemoizer()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MetricMemoizer<T>
getClassMemoizer(QualifiedName qname)
Deprecated.Gets the class metric memoizer corresponding to the qualified name.MetricMemoizer<O>
getOperationMemoizer(QualifiedName qname)
Deprecated.Gets the operation metric memoizer corresponding to the qualified name.void
reset()
Deprecated.Clears all memoizers.
-
-
-
Method Detail
-
reset
public void reset()
Deprecated.Clears all memoizers. Used for tests.
-
getOperationMemoizer
public MetricMemoizer<O> getOperationMemoizer(QualifiedName qname)
Deprecated.Description copied from interface:ProjectMemoizer
Gets the operation metric memoizer corresponding to the qualified name.- Specified by:
getOperationMemoizer
in interfaceProjectMemoizer<T extends QualifiableNode,O extends QualifiableNode>
- Parameters:
qname
- The qualified name of the operation to fetch- Returns:
- The correct memoizer, or null if it wasn't found
-
getClassMemoizer
public MetricMemoizer<T> getClassMemoizer(QualifiedName qname)
Deprecated.Description copied from interface:ProjectMemoizer
Gets the class metric memoizer corresponding to the qualified name.- Specified by:
getClassMemoizer
in interfaceProjectMemoizer<T extends QualifiableNode,O extends QualifiableNode>
- Parameters:
qname
- The qualified name of the class to fetch- Returns:
- The correct memoizer, or null if it wasn't found
-
-