1 /* *******************************************************************
2 * Copyright (c) 2005 Contributors.
4 * This program and the accompanying materials are made available
5 * under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution and is available at
7 * http://eclipse.org/legal/epl-v10.html
10 * Adrian Colyer Initial implementation
11 * ******************************************************************/
12 package org.aspectj.weaver.patterns;
14 import org.aspectj.weaver.UnresolvedType;
20 public class HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor
21 extends AbstractPatternNodeVisitor {
23 boolean ohYesItHas = false;
26 * Is the Exact type parameterized?
27 * Generic is ok as that just means we resolved a simple type pattern to a generic type
29 public Object visit(ExactTypePattern node, Object data) {
30 UnresolvedType theExactType = node.getExactType();
31 if (theExactType.isParameterizedType()) ohYesItHas = true;
32 //if (theExactType.isGenericType()) ohYesItHas = true;
37 * Any type bounds are bad.
38 * Type parameters are right out.
40 public Object visit(WildTypePattern node, Object data) {
41 if (node.getUpperBound() != null) ohYesItHas = true;
42 if (node.getLowerBound() != null) ohYesItHas = true;
43 if (node.getTypeParameters().size() != 0) ohYesItHas = true;
47 public boolean wellHasItThen/*?*/() {