for(int i = 0; i < constants.length; i++) { Constant co = constants[i]; if (co instanceof ConstantDouble || co instanceof ConstantLong) i++; if (co instanceof ConstantClass) { String name = ((ConstantClass)co).getBytes(cp); while (name.charAt(0) == '[') name = name.substring(1); if (referenced.add(name)) try { JavaClass clazz = Repository.lookupClass(name); result.add(clazz); } catch (ClassNotFoundException e) { }
for (int i = 0; i < constants.length; i++) { Constant co = constants[i]; if (co instanceof ConstantDouble || co instanceof ConstantLong) i++; if (co instanceof ConstantClass) { String name = ((ConstantClass) co).getBytes(cp); name = extractClassName(name); if (referenced.add(name)) try { JavaClass clazz = Repository.lookupClass(name); result.add(clazz); } catch (ClassNotFoundException e) { } } else if (co instanceof ConstantCP) { ConstantCP co2 = (ConstantCP) co; String className = ConstantNameAndType nt = (ConstantNameAndType) cp .getConstant(co2.getNameAndTypeIndex()); String ref = getMemberName(c, co2.getClassIndex(), nt .getNameIndex(), nt.getSignatureIndex());
	public Set<JavaClass> getReferencedClasses(JavaClass c) {		Set<JavaClass> result = new HashSet<JavaClass>();		ConstantPool cp = c.getConstantPool();		Constant[] constants = cp.getConstantPool();		for(int i = 0; i < constants.length; i++) {		    Constant co = constants[i];		    if (co instanceof ConstantDouble 				|| co instanceof ConstantLong)			i++;		    if (co instanceof ConstantClass) {			String name = ((ConstantClass)co).getBytes(cp);			while (name.charAt(0) == '[') name = name.substring(1);			if (referenced.add(name))			try {			JavaClass clazz = Repository.lookupClass(name);			result.add(clazz);			} catch (ClassNotFoundException e) {				}			}		}		return result;		}