private AnnotationTypeElementDoc[] filter(AnnotationTypeDoc doc,
            boolean required) {
            AnnotationTypeElementDoc[] members = ((AnnotationTypeDoc) doc).elements();
            List targetMembers = new ArrayList();
            for (int i = 0; i < members.length; i++) {
                if ((required && members[i].defaultValue() == null) ||
                     ((!required) && members[i].defaultValue() != null)){
                    targetMembers.add(members[i]);
                }
            }
            return (AnnotationTypeElementDoc[])
                targetMembers.toArray(new AnnotationTypeElementDoc[]{});
        }