boolean sawInitializeSuper;
@Override
public void sawOpcode(int seen) {
if (getMethodName().equals("<init>") && seen == INVOKEVIRTUAL) {
XMethod m = getXMethodOperand();
if (m != null && !m.isPrivate() && !m.isFinal()) {
int args = PreorderVisitor.getNumberArguments(m.getSignature());
OpcodeStack.Item item = stack.getStackItem(args);
if (item.getRegisterNumber() == 0) {
try {
Set<XMethod> targets = Hierarchy2.resolveVirtualMethodCallTargets(m, false, false);
Subtypes2 subtypes2 = AnalysisContext.currentAnalysisContext().getSubtypes2();
for (XMethod called : targets) {
if (!called.isAbstract() && !called.equals(m)
&& subtypes2.isSubtype(called.getClassDescriptor(), getClassDescriptor())) {
fieldSummary.setCalledFromSuperConstructor(new ProgramPoint(this), called);
}
}
} catch (ClassNotFoundException e) {
AnalysisContext.reportMissingClass(e);
}
}
}
}
if (seen == INVOKESPECIAL && getMethodName().equals("<init>") && getNameConstantOperand().equals("<init>")) {
String classOperand = getClassConstantOperand();
OpcodeStack.Item invokedOn = stack.getItemMethodInvokedOn(this);
if (invokedOn.getRegisterNumber() == 0 && !classOperand.equals(getClassName())) {
sawInitializeSuper = true;
XMethod invoked = getXMethodOperand();
if (invoked != null) {
fieldSummary.sawSuperCall(getXMethod(), invoked);
}
}