public abstract class UnResolvedWeightedCallTargets extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
UnResolvedWeightedCallTargets.UnResolvedMultiTarget
An implementation for storing a call site distribution that has multiple targets.
|
private static class |
UnResolvedWeightedCallTargets.UnResolvedSingleTarget
An implementation for storing a call site distribution that has a single target.
|
static interface |
UnResolvedWeightedCallTargets.Visitor
Used by visitTargets
|
Constructor and Description |
---|
UnResolvedWeightedCallTargets() |
Modifier and Type | Method and Description |
---|---|
abstract UnResolvedWeightedCallTargets |
augmentCount(MethodReference target,
double amount)
Augment the weight associated with the argument method by the argument amount.
|
static UnResolvedWeightedCallTargets |
create(MethodReference target,
double weight) |
abstract void |
decay(double rate)
Decay the weights of all call targets by the specified amount
|
abstract UnResolvedWeightedCallTargets |
filter(MethodReference goal) |
UnResolvedWeightedCallTargets |
incrementCount(MethodReference target)
Augment the weight associated with the argument method by 1.
|
abstract double |
totalWeight() |
abstract void |
visitTargets(UnResolvedWeightedCallTargets.Visitor func)
Iterate over all of the targets, evaluating the argument function on each edge.
|
public UnResolvedWeightedCallTargets()
public abstract void visitTargets(UnResolvedWeightedCallTargets.Visitor func)
func
- the function to evaluate on each targetpublic final UnResolvedWeightedCallTargets incrementCount(MethodReference target)
target
- the target methodpublic abstract UnResolvedWeightedCallTargets augmentCount(MethodReference target, double amount)
target
- the target methodamount
- the amount to addpublic abstract void decay(double rate)
rate
- the value to decay bypublic abstract double totalWeight()
public abstract UnResolvedWeightedCallTargets filter(MethodReference goal)
goal
- MethodReference that is the only statically possible targetnull
if no such target existspublic static UnResolvedWeightedCallTargets create(MethodReference target, double weight)