this is broken for classes like "java.util.regex.Pattern"