]> source.dussan.org Git - aspectj.git/commitdiff
extra methods for fast recognition of certain patterns
authoraclement <aclement>
Sat, 7 Nov 2009 00:25:32 +0000 (00:25 +0000)
committeraclement <aclement>
Sat, 7 Nov 2009 00:25:32 +0000 (00:25 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java

index 8eec804c403d8f6257a51ac3d32ece1da62247ed..eb20202346836416223fb894e4b30cb07e72c198 100644 (file)
@@ -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 "..";