From: aclement Date: Sat, 7 Nov 2009 00:25:32 +0000 (+0000) Subject: extra methods for fast recognition of certain patterns X-Git-Tag: V1_6_7~141 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a04e53377cbc6454dd1c79ff2a384da3b3fe97d0;p=aspectj.git extra methods for fast recognition of certain patterns --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java index 8eec804c4..eb2020234 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java @@ -259,6 +259,10 @@ public abstract class TypePattern extends PatternNode { public void postRead(ResolvedType enclosingType) { } + public boolean isEllipsis() { + return false; + } + public boolean isStar() { return false; } @@ -330,6 +334,20 @@ public abstract class TypePattern extends PatternNode { return includeSubtypes; } + /** + * For quickly recognizing the pattern '!void' + */ + public boolean isBangVoid() { + return false; + } + + /** + * for quickly recognizing the pattern 'void' + */ + public boolean isVoid() { + return false; + } + } class EllipsisTypePattern extends TypePattern { @@ -382,6 +400,11 @@ class EllipsisTypePattern extends TypePattern { s.writeByte(ELLIPSIS_KEY); } + @Override + public boolean isEllipsis() { + return true; + } + @Override public String toString() { return "..";