/** Get the names of all classes refernenced by this class. */ Set<String> getReferencedClassNames() { // refdClassNames came from class refs and type signatures in the constant pool of the classfile, // but there are other sources of class refs and type signatures that are coded as CONSTANT_Utf8_info // (such as enum classes and class references in annotation parameter values), so these need to be // added to the set of referenced classes. if (referencedClassNames == null) { referencedClassNames = new HashSet<>(); } getAnnotationInfo().getReferencedClassNames(referencedClassNames); getMethodInfo().getReferencedClassNames(referencedClassNames); getFieldInfo().getReferencedClassNames(referencedClassNames); // Get rid of self-references and references to java.lang.Object referencedClassNames.remove(name); referencedClassNames.remove("java.lang.Object"); return referencedClassNames; }