1 24 25 package org.aspectj.compiler.base.ast; 26 import org.aspectj.compiler.base.JavaCompiler; 27 import org.aspectj.compiler.base.CompilerObject; 28 import org.aspectj.compiler.base.InternalCompilerError; 29 30 35 public abstract class Walker extends CompilerObject { 36 37 public Walker(JavaCompiler compiler) { 38 super(compiler); 39 } 40 41 protected boolean preProcess(ASTObject object) { return true; } 42 protected void postProcess(ASTObject object) { } 43 44 public ASTObject process(ASTObject object) { 45 if (!preProcess(object)) return object; 46 object.walk(this); 47 postProcess(object); 48 return object; 49 } 50 } 51 | Popular Tags |