1 24 25 package org.aspectj.compiler.crosscuts.ast; 26 27 import org.aspectj.compiler.base.ast.*; 28 import org.aspectj.compiler.crosscuts.*; 29 import org.aspectj.compiler.crosscuts.joinpoints.*; 30 import org.aspectj.compiler.base.JavaCompiler; 31 32 35 36 public class BeforeAdviceDec extends AdviceDec { 37 38 protected String getAdviceKind() { return "before"; } 39 40 41 protected Stmts wrapStmts(Stmts stmts, AdvicePlan plan) { 42 stmts.add(0, plan.makeCall(null)); 43 return stmts; 44 } 45 46 48 public BeforeAdviceDec(SourceLocation location, Modifiers _modifiers, Formals _formals, TypeDs __throws, Pcd _pcd, CodeBody _body) { 49 super(location, _modifiers, _formals, __throws, _pcd, _body); 50 51 } 52 protected BeforeAdviceDec(SourceLocation source) { 53 super(source); 54 } 55 56 public ASTObject copyWalk(CopyWalker walker) { 57 BeforeAdviceDec ret = new BeforeAdviceDec(getSourceLocation()); 58 ret.preCopy(walker, this); 59 if (modifiers != null) ret.setModifiers( (Modifiers)walker.process(modifiers) ); 60 if (formals != null) ret.setFormals( (Formals)walker.process(formals) ); 61 if (_throws != null) ret.setThrows( (TypeDs)walker.process(_throws) ); 62 if (pcd != null) ret.setPcd( (Pcd)walker.process(pcd) ); 63 if (body != null) ret.setBody( (CodeBody)walker.process(body) ); 64 return ret; 65 } 66 67 68 public String getDefaultDisplayName() { 69 return "BeforeAdviceDec()"; 70 } 71 72 } 74 | Popular Tags |