private CtClass lookupClass0(String classname, boolean notCheckInner)
        throws NotFoundException
    {
        CtClass cc = null;
        do {
            try {
                cc = classPool.get(classname);
            }
            catch (NotFoundException e) {
                int i = classname.lastIndexOf('.');
                if (notCheckInner || i < 0)
                    throw e;
                else {
                    StringBuffer sbuf = new StringBuffer(classname);
                    sbuf.setCharAt(i, '$');
                    classname = sbuf.toString();
                }
            }
        } while (cc == null);
        return cc;
    }