1 24 25 package org.aspectj.compiler.crosscuts.ast; 26 import org.aspectj.compiler.base.ast.*; 27 28 import org.aspectj.compiler.base.JavaCompiler; 29 30 35 public class ModifiersPattern extends Modifiers { 36 40 public boolean matches(Modifiers otherModifiers) { 42 if ((falseValue & otherModifiers.getValue()) != 0) return false; 44 45 return super.matches(otherModifiers); 47 } 48 49 protected int falseValue; 51 public int getFalseValue() { return falseValue; } 52 public void setFalseValue(int _falseValue) { falseValue = _falseValue; } 53 54 public ModifiersPattern(SourceLocation location, int _value, int _falseValue) { 55 super(location, _value); 56 setFalseValue(_falseValue); 57 } 58 protected ModifiersPattern(SourceLocation source) { 59 super(source); 60 } 61 62 public ASTObject copyWalk(CopyWalker walker) { 63 ModifiersPattern ret = new ModifiersPattern(getSourceLocation()); 64 ret.preCopy(walker, this); 65 ret.value = value; 66 ret.falseValue = falseValue; 67 return ret; 68 } 69 70 71 public String getDefaultDisplayName() { 72 return "ModifiersPattern(value: "+value+", "+"falseValue: "+falseValue+")"; 73 } 74 75 } 77 | Popular Tags |