Java Code Examples for proguard.classfile.ClassPool#classNames()
The following examples show how to use
proguard.classfile.ClassPool#classNames() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OutputWriter.java From proguard with GNU General Public License v2.0 | 6 votes |
/** * Creates a map of old package prefixes to new package prefixes, based on * the given class pool. */ private static Map createPackagePrefixMap(ClassPool classPool) { Map packagePrefixMap = new HashMap(); Iterator iterator = classPool.classNames(); while (iterator.hasNext()) { String className = (String)iterator.next(); String packagePrefix = ClassUtil.internalPackagePrefix(className); String mappedNewPackagePrefix = (String)packagePrefixMap.get(packagePrefix); if (mappedNewPackagePrefix == null || !mappedNewPackagePrefix.equals(packagePrefix)) { String newClassName = classPool.getClass(className).getName(); String newPackagePrefix = ClassUtil.internalPackagePrefix(newClassName); packagePrefixMap.put(packagePrefix, newPackagePrefix); } } return packagePrefixMap; }
Example 2
Source File: OutputWriter.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
/** * Creates a map of old package prefixes to new package prefixes, based on * the given class pool. */ private static Map createPackagePrefixMap(ClassPool classPool) { Map packagePrefixMap = new HashMap(); Iterator iterator = classPool.classNames(); while (iterator.hasNext()) { String className = (String)iterator.next(); String packagePrefix = ClassUtil.internalPackagePrefix(className); String mappedNewPackagePrefix = (String)packagePrefixMap.get(packagePrefix); if (mappedNewPackagePrefix == null || !mappedNewPackagePrefix.equals(packagePrefix)) { String newClassName = classPool.getClass(className).getName(); String newPackagePrefix = ClassUtil.internalPackagePrefix(newClassName); packagePrefixMap.put(packagePrefix, newPackagePrefix); } } return packagePrefixMap; }
Example 3
Source File: OutputWriter.java From proguard with GNU General Public License v2.0 | 6 votes |
/** * Creates a map of old package prefixes to new package prefixes, based on * the given class pool. */ private static Map createPackagePrefixMap(ClassPool classPool) { Map packagePrefixMap = new HashMap(); Iterator iterator = classPool.classNames(); while (iterator.hasNext()) { String className = (String)iterator.next(); String packagePrefix = ClassUtil.internalPackagePrefix(className); String mappedNewPackagePrefix = (String)packagePrefixMap.get(packagePrefix); if (mappedNewPackagePrefix == null || !mappedNewPackagePrefix.equals(packagePrefix)) { String newClassName = classPool.getClass(className).getName(); String newPackagePrefix = ClassUtil.internalPackagePrefix(newClassName); packagePrefixMap.put(packagePrefix, newPackagePrefix); } } return packagePrefixMap; }
Example 4
Source File: OutputWriter.java From bazel with Apache License 2.0 | 6 votes |
/** * Creates a map of old package prefixes to new package prefixes, based on * the given class pool. */ private static Map createPackagePrefixMap(ClassPool classPool) { Map packagePrefixMap = new HashMap(); Iterator iterator = classPool.classNames(); while (iterator.hasNext()) { String className = (String)iterator.next(); String packagePrefix = ClassUtil.internalPackagePrefix(className); String mappedNewPackagePrefix = (String)packagePrefixMap.get(packagePrefix); if (mappedNewPackagePrefix == null || !mappedNewPackagePrefix.equals(packagePrefix)) { String newClassName = classPool.getClass(className).getName(); String newPackagePrefix = ClassUtil.internalPackagePrefix(newClassName); packagePrefixMap.put(packagePrefix, newPackagePrefix); } } return packagePrefixMap; }