From a04e53377cbc6454dd1c79ff2a384da3b3fe97d0 Mon Sep 17 00:00:00 2001 From: aclement Date: Sat, 7 Nov 2009 00:25:32 +0000 Subject: [PATCH] extra methods for fast recognition of certain patterns --- .../aspectj/weaver/patterns/TypePattern.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) 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 ".."; -- 2.39.5