MCPcopy Create free account
hub / github.com/LFYSec/MScan / toField

Method toField

src/main/java/pascal/taie/analysis/pta/plugin/util/CSObjs.java:114–118  ·  view source on GitHub ↗

Converts a CSObj of java.lang.reflect.Method to corresponding JMethod. If the object does not represent a Method, then return null.

(CSObj csObj)

Source from the content-addressed store, hash-verified

112 * If the object does not represent a Method, then return null.
113 */
114 @Nullable
115 public static JField toField(CSObj csObj) {
116 Object alloc = csObj.getObject().getAllocation();
117 return alloc instanceof JField field ? field : null;
118 }
119
120 /**
121 * Converts a CSObj of class to corresponding type. If the object is

Callers 2

fieldGetMethod · 0.95
fieldSetMethod · 0.95

Calls 2

getObjectMethod · 0.65
getAllocationMethod · 0.45

Tested by

no test coverage detected