@Override public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) { Annotation[] annotations = typeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = typeDeclaration.binding; if (binding == null) { return true; } String fqn = new String(typeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(typeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; } }
@Override public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) { Annotation[] annotations = typeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = typeDeclaration.binding; if (binding == null) { return true; } String fqn = new String(typeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(typeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; } }
@Override public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) { Annotation[] annotations = localTypeDeclaration.annotations; if (hasRelevantAnnotations(annotations)) { SourceTypeBinding binding = localTypeDeclaration.binding; if (binding == null) { 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 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; }
@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() || binding.isAnonymousType()) { return false; } String fqn = new String(memberTypeDeclaration.binding.readableName()); Item item = ClassItem.create(fqn, ClassKind.forType(memberTypeDeclaration)); addItem(fqn, item); addAnnotations(annotations, item); } return true; }