Class OverloadSet<T>
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.types.internal.infer.OverloadSet<T>
-
public abstract class OverloadSet<T> extends Object
Tracks a set of overloads, automatically pruning override-equivalent methods if possible.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Collector<JMethodSig,?,List<JMethodSig>>
collectMostSpecific(JTypeMirror commonSubtype)
Returns a collector that can apply to a stream of method signatures, and that collects them into a set of method, where none override one another.protected abstract OptionalBool
shouldTakePrecedence(T m1, T m2)
-
-
-
Method Detail
-
shouldTakePrecedence
protected abstract OptionalBool shouldTakePrecedence(T m1, T m2)
-
collectMostSpecific
public static Collector<JMethodSig,?,List<JMethodSig>> collectMostSpecific(JTypeMirror commonSubtype)
Returns a collector that can apply to a stream of method signatures, and that collects them into a set of method, where none override one another. Do not use this in a parallel stream. Do not use this to collect constructors. Do not use this if your stream contains methods that have different names.- Parameters:
commonSubtype
- Site where the signatures are observed. The owner of every method in the stream must be a supertype of this type- Returns:
- A collector
-
-