private static final class UnResolvedWeightedCallTargets.UnResolvedSingleTarget extends UnResolvedWeightedCallTargets
UnResolvedWeightedCallTargets.Visitor
Modifier and Type | Field and Description |
---|---|
private MethodReference |
target |
private float |
weight |
Constructor and Description |
---|
UnResolvedSingleTarget(MethodReference t,
double w) |
Modifier and Type | Method and Description |
---|---|
UnResolvedWeightedCallTargets |
augmentCount(MethodReference t,
double v)
Augment the weight associated with the argument method by the argument amount.
|
void |
decay(double rate)
Decay the weights of all call targets by the specified amount
|
UnResolvedWeightedCallTargets |
filter(MethodReference goal) |
double |
totalWeight() |
void |
visitTargets(UnResolvedWeightedCallTargets.Visitor func)
Iterate over all of the targets, evaluating the argument function on each edge.
|
create, incrementCount
private final MethodReference target
private float weight
UnResolvedSingleTarget(MethodReference t, double w)
public void visitTargets(UnResolvedWeightedCallTargets.Visitor func)
UnResolvedWeightedCallTargets
visitTargets
in class UnResolvedWeightedCallTargets
func
- the function to evaluate on each targetpublic UnResolvedWeightedCallTargets augmentCount(MethodReference t, double v)
UnResolvedWeightedCallTargets
augmentCount
in class UnResolvedWeightedCallTargets
t
- the target methodv
- the amount to addpublic void decay(double rate)
UnResolvedWeightedCallTargets
decay
in class UnResolvedWeightedCallTargets
rate
- the value to decay bypublic double totalWeight()
totalWeight
in class UnResolvedWeightedCallTargets
public UnResolvedWeightedCallTargets filter(MethodReference goal)
filter
in class UnResolvedWeightedCallTargets
goal
- MethodReference that is the only statically possible targetnull
if no such target exists