private void computeAccessedField() { if (!isConstructor()) { for (AsmEdge edge : getOutgoingEdges()) { if (isCallToNonStaticInternalField(edge)) { if (isFieldAccesingDifferentField((AsmField) edge.getTo())) { accessedField = null; break; } accessedField = (AsmField) edge.getTo(); } else if (isCallToNonStaticInternalMethod(edge)) { AsmMethod method = (AsmMethod) edge.getTo(); if (isMethodNotAccessorOrAccessingDifferentField(method)) { accessedField = null; break; } accessedField = method.getAccessedField(); } } } }
private boolean isMethodNotAccessorOrAccessingDifferentField(AsmMethod method) { return !method.isAccessor() || (accessedField != null && !accessedField.equals(method.getAccessedField())); }