Index: java/lang/Class.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v retrieving revision 1.14 diff -u -b -B -r1.14 Class.java --- java/lang/Class.java 25 Jan 2004 15:04:08 -0000 1.14 +++ java/lang/Class.java 25 Jan 2004 18:23:20 -0000 @@ -38,8 +38,8 @@ package java.lang; -import java.io.Serializable; import java.io.InputStream; +import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -596,7 +596,7 @@ } /** - * Get the interfaces this class directly implements, in the + * Get the interfaces this class directly implements, in the * order that they were declared. This returns an empty array, not null, * for Object, primitives, void, and classes or interfaces with no direct * superinterface. Array types return Cloneable and Serializable. @@ -1251,6 +1251,20 @@ } /** + * Strip the last portion of the name (after the last dot). + * + * @param name the name to get package of + * @return the package name, or "" if no package + */ + private static String getPackagePortion(String name) + { + int lastInd = name.lastIndexOf('.'); + if (lastInd == -1) + return ""; + return name.substring(0, lastInd); + } + + /** * Perform security checks common to all of the methods that * get members of this Class. */ @@ -1264,19 +1278,5 @@ if (pkg != null) sm.checkPackageAccess(pkg.getName()); } - } - - /** - * Strip the last portion of the name (after the last dot). - * - * @param name the name to get package of - * @return the package name, or "" if no package - */ - public static String getPackagePortion(String name) - { - int lastInd = name.lastIndexOf('.'); - if (lastInd == -1) - return ""; - return name.substring(0, lastInd); } }