1259N/A * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 415N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 415N/A * This code is free software; you can redistribute it and/or modify it 415N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 415N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 415N/A * This code is distributed in the hope that it will be useful, but WITHOUT 415N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 415N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 415N/A * version 2 for more details (a copy is included in the LICENSE file that 415N/A * accompanied this code). 415N/A * You should have received a copy of the GNU General Public License version 415N/A * 2 along with this work; if not, write to the Free Software Foundation, 415N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 415N/A * This source code is provided to illustrate the usage of a given feature 415N/A * or technique and has been deliberately simplified. Additional steps 727N/A * required for a production-quality application, such as security checks, 415N/A * input validation and proper error handling, might not be present in 415N/A * The 'refType' is known to match. 415N/A * TO DO: list the methods here 415N/A return (
"Breakpoints can be located only in classes. " +
415N/A * Compare a method's argument types with a Vector of type names. 415N/A * Return true if each argument type has a name identical to the 415N/A * corresponding string in the vector (allowing for varargs) 415N/A * and if the number of arguments in the method matches the 415N/A * number of names passed 415N/A // If argument counts differ, we can stop here 415N/A // Compare each argument type's name 415N/A * We have to handle varargs. EG, the 415N/A * method's last arg type is xxx[] 706N/A * while the nameList contains xxx... 415N/A * Note that the nameList can also contain 415N/A * xxx[] in which case we don't get here. 415N/A * The last types differ, it is a varargs 415N/A * method and the nameList item is varargs. 415N/A * We just have to compare the type names, eg, 415N/A * make sure we don't have xxx[] for the method 415N/A * arg type and yyy... for the nameList item. 415N/A // The type names are different lengths 415N/A // We know the two type names are the same length 415N/A // We do have xxx[] and xxx... as the last param type 415N/A * Remove unneeded spaces and expand class names to fully 415N/A * qualified names, if necessary and possible. 415N/A * Separate the type name from any array modifiers, 415N/A * stripping whitespace after the name ends. 415N/A * For varargs, there can be spaces before the ... but not 415N/A * within the ... So, we will just ignore the ... 415N/A * while stripping blanks. 711N/A break;
// name is complete 415N/A if ( (c ==
'[') || (c ==
']')) {
415N/A "Invalid argument type name");
415N/A * When there's no sign of a package name already, 415N/A * the name to a fully qualified class name 507N/A // We'll try the name as is 415N/A * Attempt an unambiguous match of the method name and 415N/A * argument specification to a method. If no arguments 415N/A * are specified, the method must not be overloaded. 415N/A * Otherwise, the argument types much match exactly 415N/A // Normalize the argument string once before looping below. 415N/A // Check each method in the class for matches 415N/A // Remember the first match in case it is the only one 415N/A // If argument types were specified, check against candidate 415N/A // Determine method for breakpoint 415N/A // Name and signature match 415N/A // At least one name matched and no arg types were specified