equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
1928 |
1928 |
1929 // <editor-fold defaultstate="collapsed" desc="asSuper"> |
1929 // <editor-fold defaultstate="collapsed" desc="asSuper"> |
1930 /** |
1930 /** |
1931 * Return the (most specific) base type of t that starts with the |
1931 * Return the (most specific) base type of t that starts with the |
1932 * given symbol. If none exists, return null. |
1932 * given symbol. If none exists, return null. |
|
1933 * |
|
1934 * Caveat Emptor: Since javac represents the class of all arrays with a singleton |
|
1935 * symbol Symtab.arrayClass, which by being a singleton cannot hold any discriminant, |
|
1936 * this method could yield surprising answers when invoked on arrays. For example when |
|
1937 * invoked with t being byte [] and sym being t.sym itself, asSuper would answer null. |
1933 * |
1938 * |
1934 * @param t a type |
1939 * @param t a type |
1935 * @param sym a symbol |
1940 * @param sym a symbol |
1936 */ |
1941 */ |
1937 public Type asSuper(Type t, Symbol sym) { |
1942 public Type asSuper(Type t, Symbol sym) { |