1 24 25 package org.aspectj.compiler.base; 26 import org.aspectj.compiler.base.ast.*; 27 28 import org.aspectj.compiler.crosscuts.ast.*; 30 import org.aspectj.compiler.crosscuts.*; 31 32 import java.util.*; 33 import java.io.*; 34 35 41 43 public class InitializerCollector extends WalkerPass { 44 private boolean collectSynthetics; 45 46 public InitializerCollector(JavaCompiler compiler, boolean collectSynthetics) { 47 super(compiler); 48 this.collectSynthetics = collectSynthetics; 49 } 50 51 public String getDisplayName() { 52 return "collecting initializers"; 53 } 54 55 public ASTObject process(ASTObject node) { 56 node.walk(this); 57 if (!(node instanceof TypeDec)) return node; 58 59 TypeDec tyDec = (TypeDec)node; 60 tyDec.addAssertionField(); 61 tyDec.collectInitializers(collectSynthetics); 62 return node; 63 } 64 } 65 66 | Popular Tags |