public CtField lookupFieldByJvmName2(String jvmClassName, Symbol fieldSym,
                                         ASTree expr) throws NoFieldException
    {
        String field = fieldSym.get();
        CtClass cc = null;
        try {
            cc = lookupClass(jvmToJavaName(jvmClassName), true);
        }
        catch (CompileError e) {
            // EXPR might be part of a qualified class name.
            throw new NoFieldException(jvmClassName + "/" + field, expr);
        }

        try {
            return cc.getField(field);
        }
        catch (NotFoundException e) {
            // maybe an inner class.
            jvmClassName = javaToJvmName(cc.getName());
            throw new NoFieldException(jvmClassName + "$" + field, expr);
        }
    }