122123124125126127128
// 10 private static String b = "b"; // 4 public void otherCost() { new CostUtil().instanceCost4(); }
891011121314
* a simple class with cost in a setter * @author alexeagle@google.com (Alex Eagle) */ public class HasSetterCost { public void setFoo(int foo) { new CostUtil().instanceCost4(); }
59606162636465
hypotheticalCostModel.computeContributionFromMethod(classCost, methodCost)); } private static class Example { public Example() { new CostUtil().instanceCost4(); }
6364656667686970
public Example() { new CostUtil().instanceCost4(); } public int doThing() { new CostUtil().instanceCost3(); return 1; }
67686970717273
int a = 0; @SuppressWarnings("unused") int b = a > 5 ? 3 : 5; b = a < 4 ? 4 : 3; // Contributes 4 new CostUtil().instanceCost4(); }