| |
---|
| | import java.util.ArrayList; |
---|
| | import java.util.List; |
---|
| | |
---|
| | import org.ntlab.deltaExtractor.Alias; |
---|
| | import org.ntlab.deltaExtractor.Alias.AliasType; |
---|
| | import org.ntlab.deltaExtractor.IAliasTracker; |
---|
| | import org.ntlab.trace.MethodExecution; |
---|
| | import org.ntlab.trace.MethodInvocation; |
---|
| | import org.ntlab.trace.Statement; |
---|
| | |
---|
| | /** |
---|
| | * Collect delta alias for MagnetRON.(Derived from DeltaAliasTracker.) |
---|
| | * |
---|
| |
---|
| | public void changeTrackingObject(String from, String to, boolean isSrcSide) { |
---|
| | |
---|
| | } |
---|
| | |
---|
| | public void shrink() { |
---|
| | // TODO Implement shrink(). |
---|
| | List<Alias> standardMethodInvocations = collectStandardMethodInvocations(aliasList); |
---|
| | List<List<Alias>> invocatoinChains = collectInvocatoinChains(standardMethodInvocations); |
---|
| | replaceInvocatoinChains(aliasList, invocatoinChains); |
---|
| | } |
---|
| | |
---|
| | private List<Alias> collectStandardMethodInvocations(List<Alias> aliasList) { |
---|
| | // TODO Implement collectStandardMethodInvocations(). |
---|
| | for (int i = 0; i < aliasList.size(); i++) { |
---|
| | Alias alias = aliasList.get(i); |
---|
| | if (alias.getAliasType() == AliasType.RECEIVER) { |
---|
| | Statement st = alias.getOccurrencePoint().getStatement(); |
---|
| | MethodInvocation methodInvocation = (MethodInvocation)st; |
---|
| | if (methodInvocation.getCalledMethodExecution().isCollectionType()) { |
---|
| | |
---|
| | } |
---|
| | } else if (alias.getAliasType() == AliasType.THIS) { |
---|
| | if (alias.getMethodExecution().isCollectionType()) { |
---|
| | } |
---|
| | } else if (alias.getAliasType() == AliasType.RETURN_VALUE) { |
---|
| | if (alias.getMethodExecution().isCollectionType()) { |
---|
| | } |
---|
| | } else if (alias.getAliasType() == AliasType.METHOD_INVOCATION) { |
---|
| | Statement st = alias.getOccurrencePoint().getStatement(); |
---|
| | MethodInvocation methodInvocation = (MethodInvocation)st; |
---|
| | if (methodInvocation.getCalledMethodExecution().isCollectionType()) { |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | return null; |
---|
| | |
---|
| | } |
---|
| | |
---|
| | private List<List<Alias>> collectInvocatoinChains(List<Alias> standardMethodInvocations) { |
---|
| | // TODO Implement collectInvocatoinChains(). |
---|
| | return null; |
---|
| | |
---|
| | } |
---|
| | |
---|
| | private List<Alias> replaceInvocatoinChains(List<Alias> aliasList, List<List<Alias>> invocatoinChains) { |
---|
| | // TODO Implement replaceInvocatoinChains(). |
---|
| | return null; |
---|
| | } |
---|
| | |
---|
| | |
---|
| | } |
---|
| | |
---|
| | |