InstanceMethods.java revision 2942:08092deced3f
1107191Sru/* 2107191Sru * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. 3107191Sru * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4107191Sru * 5107191Sru * This code is free software; you can redistribute it and/or modify it 6107191Sru * under the terms of the GNU General Public License version 2 only, as 7107191Sru * published by the Free Software Foundation. 8107191Sru * 9107191Sru * This code is distributed in the hope that it will be useful, but WITHOUT 10107191Sru * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11107191Sru * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12107191Sru * version 2 for more details (a copy is included in the LICENSE file that 13107191Sru * accompanied this code). 14107191Sru * 15175571Strhodes * You should have received a copy of the GNU General Public License version 16107191Sru * 2 along with this work; if not, write to the Free Software Foundation, 17107191Sru * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18107191Sru * 19107191Sru * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20107191Sru * or visit www.oracle.com if you need additional information or have any 21107191Sru * questions. 22107191Sru */ 23107191Sru 24107191Sru/* 25107191Sru * @test 26107191Sru * @bug 8006582 27175571Strhodes * @summary javac should generate method parameters correctly. 28175573Strhodes * @modules jdk.jdeps/com.sun.tools.classfile 29107191Sru * @build Tester 30107191Sru * @compile -parameters InstanceMethods.java 31107191Sru * @run main Tester InstanceMethods InstanceMethods.out 32107191Sru */ 33107191Sru 34107191Srupublic class InstanceMethods { 35107191Sru public void empty() {} 36107191Sru final void def(Object a, final Object ba, final String... cba) { } 37107191Sru final public void pub(Object d, final Object ed, final String... fed) { } 38107191Sru protected boolean prot(Object g, final Object hg, final String... ihg) { return true; } 39107191Sru private boolean priv(Object j, final Object kj, final String... lkj) { return true; } 40107191Sru void def(int A, Object BA, final Object CBA, final String... DCBA) { } 41107191Sru public void pub(int B, Object CB, final Object DCB, final String... EDCB) { } 42107191Sru final protected boolean prot(int C, Object DC, final Object EDC, final String... FEDC) { return true; } 43107191Sru final private boolean priv(int D, Object ED, final Object FED, final String... GFED) { return true; } 44107191Sru} 45107191Sru 46107191Sru 47107191Sru 48107191Sru