boolean (ReferenceType ownerClass, ReferenceType aClass) { String name = aClass.name(); String ownerClassName = ownerClass.name(); // return name == ownerClassName + "$$" + /[A-Za-z0-9]{8}/ return name.length() == ownerClassName.length() + 2 + 8 && name.startsWith(ownerClassName) && GENERATED_CLASS_NAME.matcher(name.substring(ownerClassName.length())).matches(); }