From 6ed595dc235f4e6f999e6256f08bdf76ef87f84a Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 25 Jan 2008 19:04:36 +0000 Subject: [PATCH] paramannos: extracted from being secondary type in existing source file --- .../patterns/AnyAnnotationTypePattern.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java diff --git a/weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java new file mode 100644 index 000000000..4a2f30af3 --- /dev/null +++ b/weaver/src/org/aspectj/weaver/patterns/AnyAnnotationTypePattern.java @@ -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 -- 2.39.5