1 19 20 package org.netbeans.modules.dbschema.migration.archiver; 21 22 26 public class MapClassName { 27 static String LEGACYPREFIX= "com.sun.forte4j.modules.dbmodel."; 28 static String CURRENTPREFIX= "org.netbeans.modules.dbschema."; 29 30 static public String getClassNameToken(String realClassName){ 31 if (realClassName.startsWith(CURRENTPREFIX)){ 32 realClassName = LEGACYPREFIX + realClassName.substring(CURRENTPREFIX.length(),realClassName.length()); 33 } 34 35 return realClassName; 36 } 37 38 static public String getRealClassName(String token){ 39 if (token.startsWith(LEGACYPREFIX)){ 40 token = CURRENTPREFIX + token.substring(LEGACYPREFIX.length(),token.length()); 41 } 42 return token; 43 } 44 public static void main(String [] args){ 45 46 String S="org.netbeans.modules.dbschema.jdbcimpl.TEST"; 47 System.out.println(getClassNameToken(S)); 48 } 49 50 } 51 | Popular Tags |