MCPcopy Create free account
hub / github.com/M66B/FairEmail / invoke

Method invoke

app/src/debug/java/eu.faircode.email/CoalMine.java:56–94  ·  view source on GitHub ↗
(ObjectReporter reporter, HeapObject.HeapInstance instance)

Source from the content-addressed store, hash-verified

54 String className = clazz.getName();
55 reporter.whenInstanceOf(className, new Function2<ObjectReporter, HeapObject.HeapInstance, Unit>() {
56 @Override
57 public Unit invoke(ObjectReporter reporter, HeapObject.HeapInstance instance) {
58 HeapField hfName = instance.get(className, "name");
59 if (hfName != null) {
60 String label = hfName.getValue().readAsJavaString();
61 reporter.getLabels().add("name=" + label);
62 }
63
64 // Could be different class loader
65 if (className.equals(SimpleTask.class.getName())) {
66 HeapField hfStarted = instance.get(className, "started");
67 if (hfStarted != null) {
68 Long started = hfStarted.getValue().getAsLong();
69 if (started != null) {
70 String label = (started == 0 ? null : new Date(started).toString());
71 reporter.getLabels().add("started=" + label);
72 }
73 }
74 HeapField hfDestroyed = instance.get(className, "destroyed");
75 if (hfDestroyed != null) {
76 Boolean destroyed = hfDestroyed.getValue().getAsBoolean();
77 if (destroyed != null)
78 reporter.getLabels().add("destroyed=" + destroyed);
79 }
80 } else if (className.equals(TwoStateOwner.class.getName())) {
81 HeapField hfState = instance.get(className, "state");
82 if (hfState != null) {
83 String state = hfState.getValue().readAsJavaString();
84 reporter.getLabels().add("state=" + state);
85 }
86 HeapField hfOwned = instance.get(className, "owned");
87 if (hfOwned != null) {
88 Boolean owned = hfOwned.getValue().getAsBoolean();
89 reporter.getLabels().add("owned=" + owned);
90 }
91 }
92
93 return null;
94 }
95 });
96 }
97 });

Callers 15

applyNotificationMethod · 0.80
getMIUIVersionMethod · 0.80
getFileDescriptor$Method · 0.80
cleanContentTypeMethod · 0.80
getSocketFactoryMethod · 0.80
matchCertMethod · 0.80
getZonedDateTimeMethod · 0.80
getLongThreadIDMethod · 0.80
getLocalHostMethod · 0.80
parseDurationToMillisMethod · 0.80
reverseOrderMethod · 0.80
reflectionClassNamesMethod · 0.80

Calls 7

getValueMethod · 0.65
getNameMethod · 0.65
getMethod · 0.45
addMethod · 0.45
getLabelsMethod · 0.45
equalsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected