@Override public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) { Annotation[] annotations = localTypeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = localTypeDeclaration.binding; if (binding == null) { return true; } if (binding.isAnnotationType() // Public typedef annotation need to be kept; they're not // removed by TypedefCollector#recordTypedefs so users may // end up referencing the typedef annotation itself && TypedefCollector.isHiddenTypeDef(localTypeDeclaration)) { return true; } String fqn = getFqn(scope); if (fqn == null) { fqn = new String(localTypeDeclaration.binding.readableName()); } Item item = ClassItem.create(fqn, ClassKind.forType(localTypeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; }
@Override public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) { Annotation[] annotations = memberTypeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = memberTypeDeclaration.binding; if (!(binding instanceof MemberTypeBinding)) { return true; } if (binding.isAnnotationType() && TypedefCollector.isHiddenTypeDef(memberTypeDeclaration) || binding.isAnonymousType()) { return true; } String fqn = new String(memberTypeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(memberTypeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; }
+ " should have @Retention(RetentionPolicy.SOURCE)"); if (declaration.binding != null && isHiddenTypeDef(declaration)) { StringBuilder sb = new StringBuilder(100); for (char c : declaration.binding.qualifiedPackageName()) {