1 24 25 package org.aspectj.compiler.base; 26 27 import org.aspectj.compiler.base.ast.*; 28 import org.aspectj.compiler.base.CompilerObject; 29 30 import java.util.*; 31 32 public abstract class AbstractCompilerPass extends CompilerObject implements CompilationUnitPass { 33 public AbstractCompilerPass(JavaCompiler compiler) { 34 super(compiler); 35 } 36 37 public abstract String getDisplayName(); 38 39 public double getWorkEstimate() { return 1.0; } 40 41 public void transformWorld() { 42 if (getDisplayName() != null) getCompiler().beginSection(getDisplayName()); 43 for (Iterator i = getWorld().getCompilationUnits().iterator(); i.hasNext(); ) { 44 CompilationUnit cu = (CompilationUnit)i.next(); 45 transform(cu); 46 getCompiler().completedFile(this, cu); 47 } 48 } 49 50 public void transform(CompilationUnit cu) { 51 for (Iterator j = cu.getDefinedTypes().iterator(); j.hasNext(); ) { 52 TypeDec td = (TypeDec)j.next(); 53 transform(td); 54 } 55 } 56 57 public void transform(TypeDec td) { 58 } 59 } 60 61 | Popular Tags |