package org.ntlab.deltaViewer; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.ntlab.deltaExtractor.ExtractedStructure; import org.ntlab.trace.MethodExecution; import org.ntlab.trace.Reference; import org.ntlab.trace.TracePoint; public class CollaborationObjectCallGraph implements IObjectCallGraph { private List<Reference> references = new ArrayList<>(); private List<MethodExecution> startPoints = new ArrayList<>(); private List<TracePoint> relatedPoints = new ArrayList<>(); public CollaborationObjectCallGraph(ExtractedStructure e) { references.addAll(e.getDelta().getSrcSide()); references.addAll(e.getDelta().getDstSide()); startPoints.add(e.getCoordinator()); relatedPoints.add(e.getRelatedTracePoint()); } @Override public List<Reference> getReferences() { // TODO Auto-generated method stub return references; } @Override public List<MethodExecution> getStartPoints() { // TODO Auto-generated method stub return startPoints; } @Override public List<TracePoint> getRelatedPoints() { // TODO Auto-generated method stub return relatedPoints; } @Override public Map<MethodExecution, List<MethodExecution>> getCallTree() { // TODO Auto-generated method stub return null; } public void merge(ExtractedStructure e) { references.addAll(e.getDelta().getSrcSide()); references.addAll(e.getDelta().getDstSide()); // lowest common ancestor algorithm // startPoints.add(e.getCoordinator()); relatedPoints.add(e.getRelatedTracePoint()); // 時間順にするのか } }