1 /* |
1 /* |
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2012, 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 |
384 } |
384 } |
385 |
385 |
386 /** |
386 /** |
387 * Return true if given file name is a valid class name |
387 * Return true if given file name is a valid class name |
388 * (including "package-info"). |
388 * (including "package-info"). |
389 * @param clazzname the name of the class to check. |
389 * @param s the name of the class to check. |
390 * @return true if given class name is a valid class name |
390 * @return true if given class name is a valid class name |
391 * and false otherwise. |
391 * and false otherwise. |
392 */ |
392 */ |
393 public static boolean isValidClassName(String s) { |
393 public static boolean isValidClassName(String s) { |
394 if (s.length() < 1) return false; |
394 if (s.length() < 1) return false; |