325N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * {@link Navigator} implementation for {@code java.lang.reflect}. 325N/A * Use {@link Navigator#REFLECTION} 325N/A // p is of the form sup<...> 325N/A // not clear what I should do here 325N/A // not clear what I should do here 325N/A * Replaces the type variables in {@code t} by its actual arguments. 325N/A * provides a list of type variables. See {@link GenericDeclaration#getTypeParameters()} 325N/A * actual arguments. See {@link ParameterizedType#getActualTypeArguments()} 325N/A return v;
// this is a free variable 325N/A // TODO: this is probably still incorrect 325N/A // bind( "? extends T" ) with T= "? extends Foo" should be "? extends Foo", 325N/A // not "? extends (? extends Foo)" 325N/A * Implements the logic for {@link #erasure(Type)}. 325N/A // TODO: why getRawType returns Type? not Class? 325N/A * Returns the runtime representation of the given type. 325N/A * This corresponds to the notion of the erasure in JSR-14. 325N/A * Because of the difference in the way APT and the Java reflection 325N/A * treats primitive type and array type, we can't define this method 325N/A * on {@link Navigator}. 325N/A * It made me realize how difficult it is to define the common navigation 325N/A * layer for two different underlying reflection library. The other way 325N/A * is to throw away the entire parameterization and go to the wrapper approach. 325N/A * Returns the {@link Type} object that represents {@code clazz<T1,T2,T3>}. 325N/A // this isn't actually correct, 325N/A // as the JLS considers 325N/A // class Derived extends Base<Integer> { 325N/A // Integer getX() { ... } 325N/A // to be overrided. Handling this correctly needs a careful implementation 325N/A // recursively go into the base class 325N/A * JDK 5.0 has a bug of creating {@link GenericArrayType} where it shouldn't. 325N/A * fix that manually to work around the problem.