if (trace.isTraceEnabled()) {
trace.enter("addLibraryAspect", this, aspectName);
}
// 1 - resolve as is
UnresolvedType unresolvedT = UnresolvedType.forName(aspectName);
unresolvedT.setNeedsModifiableDelegate(true);
ResolvedType type = world.resolve(unresolvedT, true);
if (type.isMissing()) {
// fallback on inner class lookup mechanism
String fixedName = aspectName;
int hasDot = fixedName.lastIndexOf('.');
while (hasDot > 0) {
// System.out.println("BcelWeaver.addLibraryAspect " +
// fixedName);
char[] fixedNameChars = fixedName.toCharArray();
fixedNameChars[hasDot] = '$';
fixedName = new String(fixedNameChars);
hasDot = fixedName.lastIndexOf('.');
UnresolvedType ut = UnresolvedType.forName(fixedName);
ut.setNeedsModifiableDelegate(true);
type = world.resolve(ut, true);
if (!type.isMissing()) {
break;
}
}