]> source.dussan.org Git - aspectj.git/commitdiff
paramannos: extracted from being secondary type in existing source file
authoraclement <aclement>
Fri, 25 Jan 2008 19:04:36 +0000 (19:04 +0000)
committeraclement <aclement>
Fri, 25 Jan 2008 19:04:36 +0000 (19:04 +0000)
weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java [new file with mode: 0644]

diff --git a/weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java
new file mode 100644 (file)
index 0000000..4a2f30a
--- /dev/null
@@ -0,0 +1,55 @@
+/* *******************************************************************
+ * Copyright (c) 2008 Contributors
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/epl-v10.html 
+ *  
+ * Contributors
+ * Andy Clement - extracted from AnnotationTypePattern
+ * ******************************************************************/
+ package org.aspectj.weaver.patterns;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.Map;
+
+import org.aspectj.util.FuzzyBoolean;
+import org.aspectj.weaver.AnnotatedElement;
+import org.aspectj.weaver.World;
+import org.aspectj.weaver.ResolvedType;
+
+public class AnyAnnotationTypePattern extends AnnotationTypePattern {
+
+    public FuzzyBoolean fastMatches(AnnotatedElement annotated) {
+        return FuzzyBoolean.YES;
+    }
+    
+       public FuzzyBoolean matches(AnnotatedElement annotated) {
+               return FuzzyBoolean.YES;
+       }
+       
+       public FuzzyBoolean matches(AnnotatedElement annotated,ResolvedType[] parameterAnnotations) {
+               return FuzzyBoolean.YES;
+       }
+
+       public void write(DataOutputStream s) throws IOException {
+               s.writeByte(AnnotationTypePattern.ANY_KEY);
+       }
+       
+       public void resolve(World world) {
+       }
+       
+       public String toString() { return "@ANY"; }
+
+    public Object accept(PatternNodeVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+    
+    public boolean isAny() { return true; }
+    
+    public AnnotationTypePattern parameterizeWith(Map arg0,World w) {
+       return this;
+    }
+}
\ No newline at end of file