public boolean isStreamOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame) { if (isOpenOnCreation) { return false; } Instruction ins = handle.getInstruction(); if (!(ins instanceof INVOKESPECIAL)) { return false; } // Does this instruction open the stream? INVOKESPECIAL inv = (INVOKESPECIAL) ins; return frame.isValid() && getInstanceValue(frame, inv, cpg).isInstance() && matchMethod(inv, cpg, this.getResourceClass(), Const.CONSTRUCTOR_NAME); }
if (!frame.isValid() || !getInstanceValue(frame, inv, cpg).isInstance()) { return false;
public boolean isStreamOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame) { if (isOpenOnCreation) { return false; } Instruction ins = handle.getInstruction(); if (!(ins instanceof INVOKESPECIAL)) { return false; } // Does this instruction open the stream? INVOKESPECIAL inv = (INVOKESPECIAL) ins; return frame.isValid() && getInstanceValue(frame, inv, cpg).isInstance() && matchMethod(inv, cpg, this.getResourceClass(), "<init>"); }
if (!frame.isValid() || !getInstanceValue(frame, inv, cpg).isInstance()) { return false;