r1632 - branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/reflect
Author: tchemit Date: 2009-11-05 18:02:40 +0100 (Thu, 05 Nov 2009) New Revision: 1632 Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java Log: add getSimpleName method to obtain the simple name of the class Modified: branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java =================================================================== --- branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java 2009-11-05 02:25:48 UTC (rev 1631) +++ branches/jaxx-2.X/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java 2009-11-05 17:02:40 UTC (rev 1632) @@ -1,23 +1,23 @@ -/* - * *##% - * JAXX Compiler - * Copyright (C) 2008 - 2009 CodeLutin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* - */ +/* + * *##% + * JAXX Compiler + * Copyright (C) 2008 - 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * ##%* + */ package jaxx.compiler.reflect; import jaxx.runtime.JAXXObjectDescriptor; @@ -68,6 +68,11 @@ return name; } + public String getSimpleName() { + int dot = name.lastIndexOf("."); + return dot == -1 ? name : name.substring(dot + 1); + } + public String getPackageName() { return packageName; }
participants (1)
-
tchemit@users.nuiton.org