2362N/A * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A/* This file was generated AUTOMATICALLY from a template file Wed Jun 17 10:43:47 PDT 1998 */ 0N/A * code for verifying the date in a ClassClass structure for internal 0N/A/* Argument for is_legal_fieldname */ 0N/A /* Make sure all the method names and signatures are okay */ 0N/A /* Make sure all the field names and signatures are okay */ 0N/A /* Make sure we are not overriding any final methods or classes*/ 0N/A /* Only internal methods can be static */ 0N/A /* Let's make two quick passes over the constant pool. The first one 0N/A * checks that everything is of the right type. */ 0N/A /* This can only happen if a string is the "initial" value of 0N/A * some final static String. We assume that the checking has 0N/A * already been done. 0N/A/* Return true if the entire second argument consists of a legal fieldname 0N/A * (or classname, if the third argument is LegalClass). 0N/A/* Return true if the entire string consists of a legal field signature */ 0N/A if (p !=
0 && p[
0] ==
'\0') {
0N/A /* The first character must be a '(' */ 0N/A /* Skip over however many legal field signatures there are */ 0N/A /* The first non-signature thing better be a ')' */ 0N/A /* All internal methods must return void */ 0N/A /* Now, we better just have a return value. */ 0N/A * This code mirrors Character.isJavaIdentifierStart. It determines whether 0N/A * the specified character is a legal start of a Java identifier as per JLS. 0N/A * The parameter ch is the character to be tested; return 1 if the 0N/A * character is a letter, 0 otherwise. 0N/A * This code mirrors Character.isJavaIdentifierPart. It determines whether 0N/A * the specified character is a legal part of a Java identifier as per JLS. 0N/A * The parameter ch is the character to be tested; return 1 if the 0N/A * character is a digit, 0 otherwise. 0N/A/* Take pointer to a string. Skip over the longest part of the string that 0N/A * could be taken as a fieldname. Allow '/' if slash_okay is TRUE. 0N/A * Return a pointer to just past the fieldname. Return NULL if no fieldname 0N/A * at all was found, or in the case of slash_okay being true, we saw 0N/A * consecutive slashes (meaning we were looking for a qualified path but 0N/A * found something that was badly-formed). 0N/A return 0;
/* Don't permit consecutive slashes */ 0N/A/* Take pointer to a string. Skip over the longest part of the string that 0N/A * could be taken as a field signature. Allow "void" if void_okay. 0N/A * Return a pointer to just past the signature. Return NULL if no legal 0N/A * signature is found. 0N/A /* Skip over the classname, if one is there. */ 0N/A /* The next character better be a semicolon. */ 0N/A if (p && p[
0] ==
';')
0N/A /* The rest of what's there better be a legal signature. */ 0N/A/* For use from outside the file. Determine if the specified name is legal 0N/A * UTF name for a classname. 0N/A * Note that this routine expects the internal form of qualified classes: 0N/A * the dots should have been replaced by slashes. 0N/A /* Everything that's left better be a field signature */ 0N/A /* skip over the fieldname. Slashes are okay */ 0N/A return (p !=
0 && p[
0] ==
'\0');