1 24 25 package org.aspectj.compiler.crosscuts.ast; 26 27 import org.aspectj.compiler.base.ast.*; 28 import org.aspectj.compiler.crosscuts.joinpoints.*; 29 30 import org.aspectj.util.InvertableSet; 31 32 import java.util.*; 33 34 import org.aspectj.compiler.base.JavaCompiler; 35 36 40 41 public class NotPcd extends Pcd { 42 public String toShortString() { 43 return "!" + getPcd().toShortString(); 44 } 45 46 public void checkStatic() { getPcd().checkStatic(); } 47 48 public JpPlanner makePlanner(PlanData planData) { 49 return getPcd().makePlanner(planData).not(); 50 } 51 52 protected Pcd pcd; 54 public Pcd getPcd() { return pcd; } 55 public void setPcd(Pcd _pcd) { 56 if (_pcd != null) _pcd.setParent(this); 57 pcd = _pcd; 58 } 59 60 public NotPcd(SourceLocation location, Pcd _pcd) { 61 super(location); 62 setPcd(_pcd); 63 } 64 protected NotPcd(SourceLocation source) { 65 super(source); 66 } 67 68 public ASTObject copyWalk(CopyWalker walker) { 69 NotPcd ret = new NotPcd(getSourceLocation()); 70 ret.preCopy(walker, this); 71 if (pcd != null) ret.setPcd( (Pcd)walker.process(pcd) ); 72 return ret; 73 } 74 75 public ASTObject getChildAt(int childIndex) { 76 switch(childIndex) { 77 case 0: return pcd; 78 default: return super.getChildAt(childIndex); 79 } 80 } 81 public String getChildNameAt(int childIndex) { 82 switch(childIndex) { 83 case 0: return "pcd"; 84 default: return super.getChildNameAt(childIndex); 85 } 86 } 87 public void setChildAt(int childIndex, ASTObject child) { 88 switch(childIndex) { 89 case 0: setPcd((Pcd)child); return; 90 default: super.setChildAt(childIndex, child); return; 91 } 92 } 93 public int getChildCount() { 94 return 1; 95 } 96 97 public String getDefaultDisplayName() { 98 return "NotPcd()"; 99 } 100 101 } 103 104 | Popular Tags |