2
2
* ProGuard -- shrinking, optimization, obfuscation, and preverification
5
* Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
5
* Copyright (c) 2002-2012 Eric Lafortune (eric@graphics.cornell.edu)
7
7
* This program is free software; you can redistribute it and/or modify it
8
8
* under the terms of the GNU General Public License as published by the Free
107
107
return new RenamedDataEntry(dataEntry, newDataEntryName);
111
// Otherwise stop looking.
118
// Try to find a corresponding package name by increasingly removing
120
String packagePrefix = dataEntryName;
123
// Chop off the class name or the last subpackage name.
124
packagePrefix = ClassUtil.internalPackagePrefix(packagePrefix);
126
// Is there a package corresponding to the package prefix?
127
String newPackagePrefix = (String)packagePrefixMap.get(packagePrefix);
128
if (newPackagePrefix != null)
130
// Did the package get a new name?
131
if (!packagePrefix.equals(newPackagePrefix))
133
// Return a renamed data entry.
134
String newDataEntryName =
135
newPackagePrefix + dataEntryName.substring(packagePrefix.length());
137
return new RenamedDataEntry(dataEntry, newDataEntryName);
110
141
// Otherwise stop looking.
116
// Did the package get a new name?
117
String packagePrefix = ClassUtil.internalPackagePrefix(dataEntryName);
118
String newPackagePrefix = (String)packagePrefixMap.get(packagePrefix);
119
if (newPackagePrefix != null &&
120
!packagePrefix.equals(newPackagePrefix))
122
// Return a renamed data entry.
123
String newDataEntryName =
124
newPackagePrefix + dataEntryName.substring(packagePrefix.length());
126
return new RenamedDataEntry(dataEntry, newDataEntryName);
146
while (packagePrefix.length() > 0);
129
148
return dataEntry;