public void recordMethodWithStackValues(AnalysisMethod analysisMethod) { methodsWithStackValues.addElement(analysisMethod); }
public Collection<TypeFlow<?>> getObservers() { return observers.getElements(); }
protected AbstractVirtualInvokeTypeFlow(BigBang bb, MethodFlowsGraph methodFlows, AbstractVirtualInvokeTypeFlow original) { super(bb, methodFlows, original); callees = new ConcurrentLightHashSet<>(); }
@Override public Collection<MethodFlowsGraph> getCalleesFlows(BigBang bb) { // collect the flow graphs, one for each analysis method, since it is context // insensitive List<MethodFlowsGraph> methodFlowsGraphs = new ArrayList<>(callees.size()); for (AnalysisMethod method : callees.getElements()) { methodFlowsGraphs.add(method.getTypeFlow().getFlows(bb.contextPolicy().emptyContext())); } return methodFlowsGraphs; }
public boolean removeObservee(TypeFlow<?> observee) { return observees.removeElement(observee); }
public void clearUses() { uses.clear(); }
public boolean removeInput(TypeFlow<?> input) { return inputs.removeElement(input); }
public void addObservee(TypeFlow<?> observee) { observees.addElement(observee); }
public Collection<TypeFlow<?>> getInputs() { return inputs.getElements(); }
public boolean removeObserver(TypeFlow<?> observer) { observer.removeObservee(this); return observers.removeElement(observer); }
private TypeFlow(T source, AnalysisType declaredType, TypeState typeState, int slot, boolean isClone, MethodFlowsGraph graphRef) { this.id = nextId.incrementAndGet(); this.source = source; this.declaredType = declaredType; this.slot = slot; this.isClone = isClone; this.graphRef = graphRef; this.context = graphRef != null ? graphRef.context() : null; this.state = typeState; this.uses = new ConcurrentLightHashSet<>(); this.inputs = new ConcurrentLightHashSet<>(); this.observers = new ConcurrentLightHashSet<>(); this.observees = new ConcurrentLightHashSet<>(); this.usedAsAParameter = false; this.usedAsAReceiver = false; }
public void addInput(TypeFlow<?> input) { inputs.addElement(input); }
@Override public final Collection<AnalysisMethod> getCallees() { return callees.getElements(); }
public boolean removeUse(TypeFlow<?> use) { use.removeInput(this); return uses.removeElement(use); }
protected AbstractVirtualInvokeTypeFlow(Invoke invoke, MethodCallTargetNode target, TypeFlow<?>[] actualParameters, ActualReturnTypeFlow actualReturn, BytecodeLocation location) { super(invoke, target, actualParameters, actualReturn, location); assert target.invokeKind() == InvokeKind.Virtual || target.invokeKind() == InvokeKind.Interface; callees = new ConcurrentLightHashSet<>(); }
protected boolean addCallee(AnalysisMethod callee) { boolean add = callees.addElement(callee); if (this.isClone()) { // if this is a clone, register the callee with the original invoke ((AbstractVirtualInvokeTypeFlow) originalInvoke).addCallee(callee); } return add; }
public Collection<TypeFlow<?>> getUses() { return uses.getElements(); }
protected boolean doAddUse(BigBang bb, TypeFlow<?> use, boolean registerInput) { if (use.equals(this)) { return false; } if (bb.trackTypeFlowInputs() || registerInput) { use.addInput(this); } return uses.addElement(use); }
public Collection<TypeFlow<?>> getObservees() { return observees.getElements(); }
protected boolean doAddObserver(BigBang bb, TypeFlow<?> observer, boolean registerObservees) { if (observer.equals(this)) { return false; } if (bb.trackTypeFlowInputs() || registerObservees) { observer.addObservee(this); } return observers.addElement(observer); }