DisposeResourcesVisitor.java
Go to the documentation of this file.00001 package edu.rice.cs.hpc.data.experiment.scope.visitors;
00002
00003 import edu.rice.cs.hpc.data.experiment.scope.AlienScope;
00004 import edu.rice.cs.hpc.data.experiment.scope.CallSiteScope;
00005 import edu.rice.cs.hpc.data.experiment.scope.FileScope;
00006 import edu.rice.cs.hpc.data.experiment.scope.GroupScope;
00007 import edu.rice.cs.hpc.data.experiment.scope.LineScope;
00008 import edu.rice.cs.hpc.data.experiment.scope.LoadModuleScope;
00009 import edu.rice.cs.hpc.data.experiment.scope.LoopScope;
00010 import edu.rice.cs.hpc.data.experiment.scope.ProcedureScope;
00011 import edu.rice.cs.hpc.data.experiment.scope.RootScope;
00012 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00013 import edu.rice.cs.hpc.data.experiment.scope.ScopeVisitType;
00014 import edu.rice.cs.hpc.data.experiment.scope.StatementRangeScope;
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 public class DisposeResourcesVisitor implements IScopeVisitor
00030 {
00031 public void visit(Scope scope, ScopeVisitType vt) { inspect(scope, vt); }
00032 public void visit(RootScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00033 public void visit(LoadModuleScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00034 public void visit(FileScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00035 public void visit(ProcedureScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00036 public void visit(AlienScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00037 public void visit(LoopScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00038 public void visit(StatementRangeScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00039 public void visit(CallSiteScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00040 public void visit(LineScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00041 public void visit(GroupScope scope, ScopeVisitType vt) { inspect(scope, vt); }
00042
00043
00044 private void inspect(Scope scope, ScopeVisitType vt) {
00045
00046 if (vt == ScopeVisitType.PostVisit) {
00047 scope.dispose();
00048 }
00049 }
00050 }