String classname = ((ConstantUtf8) nameconst).getBytes(); if (jclassNestedName.equals(classname)) { return getScope(ic.getInnerAccessFlags()); }
return getScope(ic.getInnerAccessFlags());
    public static Scope getClassScope(JavaClass jclass) throws CheckerException    {        int dollarPos = jclass.getClassName().lastIndexOf('$');        if (dollarPos == -1)        {            // not a nested class            return getScope(jclass.getAccessFlags());        }        // ok this is a nested class        String jclassName = jclass.getClassName();        String enclosingClassName = jclassName.substring(0, dollarPos);        String jclassNestedName = jclassName.substring(dollarPos + 1);        Repository repo = jclass.getRepository();        JavaClass enclosingClass = repo.findClass(enclosingClassName);        if (enclosingClass == null)        {            throw new CheckerException(                "Unable to locate enclosing class " + enclosingClassName                + " for nested class " + jclassName);        }        ConstantPool pool = enclosingClass.getConstantPool();        Attribute[] attrs = enclosingClass.getAttributes();        for (int i = 0; i < attrs.length; ++i)        {            if (attrs[i] instanceof InnerClasses)            {                InnerClasses ics = (InnerClasses) attrs[i];                InnerClass[] icarray = ics.getInnerClasses();                for (int j = 0; j < icarray.length; ++j)                {                    InnerClass ic = icarray[j];                    int nameIndex = ic.getInnerNameIndex();                    Constant nameconst = pool.getConstant(nameIndex);                    if (nameconst instanceof ConstantUtf8)                    {                        String classname = ((ConstantUtf8) nameconst).getBytes();                        if (jclassNestedName.equals(classname))                        {                            return getScope(ic.getInnerAccessFlags());                        }                    }                }            }        }        // weird; no nested class info found        throw new CheckerException(            "Unable to find information in class " + enclosingClass.getClassName()            + " referring back to nested class " + jclassName);    }