public Type[] interfaceTypes() { return wrapped.interfaceTypes(); }
private static Type[] interfaceTypesOf(Type type) { if (type instanceof AnnotatedType) type = ((AnnotatedType)type).underlyingType(); return type instanceof ClassDoc ? ((ClassDoc)type).interfaceTypes() : ((ParameterizedType)type).interfaceTypes(); }
private static void findAllInterfaceTypes(Map<ClassDoc,Type> results, ParameterizedType p, Configuration configuration) { Type superType = p.superclassType(); if (superType == null) return; addAllInterfaceTypes(results, superType, superType instanceof ClassDoc ? ((ClassDoc) superType).interfaceTypes() : ((ParameterizedType) superType).interfaceTypes(), false, configuration); }
private static void findAllInterfaceTypes(Map<ClassDoc,Type> results, ClassDoc c, boolean raw, Configuration configuration) { Type superType = c.superclassType(); if (superType == null) return; addAllInterfaceTypes(results, superType, superType instanceof ClassDoc ? ((ClassDoc) superType).interfaceTypes() : ((ParameterizedType) superType).interfaceTypes(), raw, configuration); }
final Type[] implementedTypes = classDoc.interfaceTypes(); for (Type implementedType : implementedTypes)
final Type[] extendingInterfaces = interfaceDoc.interfaceTypes(); for (Type extendingInterface : extendingInterfaces)
superType = ((ParameterizedType) type).superclassType(); } else if (type instanceof ClassDoc) { interfaceTypes = ((ClassDoc) type).interfaceTypes(); superType = ((ClassDoc) type).superclassType(); } else { interfaceTypes = type.asClassDoc().interfaceTypes(); superType = type.asClassDoc().superclassType(); superType, superType instanceof ClassDoc ? ((ClassDoc) superType).interfaceTypes() : ((ParameterizedType) superType).interfaceTypes(), false, configuration);
superType = ((ParameterizedType) type).superclassType(); } else if (type instanceof ClassDoc) { interfaceTypes = ((ClassDoc) type).interfaceTypes(); superType = ((ClassDoc) type).superclassType(); } else { interfaceTypes = type.asClassDoc().interfaceTypes(); superType = type.asClassDoc().superclassType();
protected Interface parseInterface(ClassDoc classDoc) { Interface interfaceNode = objectFactory.createInterface(); interfaceNode.setName(classDoc.name()); interfaceNode.setQualified(classDoc.qualifiedName()); String comment = classDoc.commentText(); if (comment.length() > 0) { interfaceNode.setComment(comment); } interfaceNode.setIncluded(classDoc.isIncluded()); interfaceNode.setScope(parseScope(classDoc)); for (TypeVariable typeVariable : classDoc.typeParameters()) { interfaceNode.getGeneric().add(parseTypeParameter(typeVariable)); } for (Type interfaceType : classDoc.interfaceTypes()) { interfaceNode.getInterface().add(parseTypeInfo(interfaceType)); } for (MethodDoc method : classDoc.methods()) { interfaceNode.getMethod().add(parseMethod(method)); } for (AnnotationDesc annotationDesc : classDoc.annotations()) { interfaceNode.getAnnotation().add(parseAnnotationDesc(annotationDesc, classDoc.qualifiedName())); } for (Tag tag : classDoc.tags()) { interfaceNode.getTag().add(parseTag(tag)); } for (FieldDoc field : classDoc.fields()) { interfaceNode.getField().add(parseField(field)); } return interfaceNode; }
private Type[] getInterfaceTypeArguments(ClassDoc iface, Type t) { if (t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) t; if (iface != null && iface.equals(t.asClassDoc())) { return pt.typeArguments(); } else { for (Type pti : pt.interfaceTypes()) { Type[] result = getInterfaceTypeArguments(iface, pti); if (result != null) return result; } if (pt.superclassType() != null) return getInterfaceTypeArguments(iface, pt.superclassType()); } } else if (t instanceof ClassDoc) { ClassDoc cd = (ClassDoc) t; for (Type pti : cd.interfaceTypes()) { Type[] result = getInterfaceTypeArguments(iface, pti); if (result != null) return result; } if (cd.superclassType() != null) return getInterfaceTypeArguments(iface, cd.superclassType()); } return null; }
private Type[] getInterfaceTypeArguments(ClassDoc iface, Type t) { if (t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) t; if (iface != null && iface.equals(t.asClassDoc())) { return pt.typeArguments(); } else { for (Type pti : pt.interfaceTypes()) { Type[] result = getInterfaceTypeArguments(iface, pti); if (result != null) return result; } if (pt.superclassType() != null) return getInterfaceTypeArguments(iface, pt.superclassType()); } } else if (t instanceof ClassDoc) { ClassDoc cd = (ClassDoc) t; for (Type pti : cd.interfaceTypes()) { Type[] result = getInterfaceTypeArguments(iface, pti); if (result != null) return result; } if (cd.superclassType() != null) return getInterfaceTypeArguments(iface, cd.superclassType()); } return null; }
protected Enum parseEnum(ClassDoc classDoc) { Enum enumNode = objectFactory.createEnum(); enumNode.setName(classDoc.name()); enumNode.setQualified(classDoc.qualifiedName()); String comment = classDoc.commentText(); if (comment.length() > 0) { enumNode.setComment(comment); } enumNode.setIncluded(classDoc.isIncluded()); enumNode.setScope(parseScope(classDoc)); Type superClassType = classDoc.superclassType(); if (superClassType != null) { enumNode.setClazz(parseTypeInfo(superClassType)); } for (Type interfaceType : classDoc.interfaceTypes()) { enumNode.getInterface().add(parseTypeInfo(interfaceType)); } for (FieldDoc field : classDoc.enumConstants()) { enumNode.getConstant().add(parseEnumConstant(field)); } for (AnnotationDesc annotationDesc : classDoc.annotations()) { enumNode.getAnnotation().add(parseAnnotationDesc(annotationDesc, classDoc.qualifiedName())); } for (Tag tag : classDoc.tags()) { enumNode.getTag().add(parseTag(tag)); } return enumNode; }
for (Type iface : c.interfaceTypes()) { ClassDoc ic = iface.asClassDoc(); if (!hidden(ic)) {
/** Print a class's relations */ public void printRelations(ClassDoc c) { Options opt = optionProvider.getOptionsFor(c); if (hidden(c) || c.name().equals("")) // avoid phantom classes, they may pop up when the source uses annotations return; // Print generalization (through the Java superclass) Type s = c.superclassType(); ClassDoc sc = s != null && !s.qualifiedTypeName().equals(Object.class.getName()) ? s.asClassDoc() : null; if (sc != null && !c.isEnum() && !hidden(sc)) relation(opt, RelationType.EXTENDS, c, sc, null, null, null); // Print generalizations (through @extends tags) for (Tag tag : c.tags("extends")) if (!hidden(tag.text())) relation(opt, RelationType.EXTENDS, c, c.findClass(tag.text()), null, null, null); // Print realizations (Java interfaces) for (Type iface : c.interfaceTypes()) { ClassDoc ic = iface.asClassDoc(); if (!hidden(ic)) relation(opt, RelationType.IMPLEMENTS, c, ic, null, null, null); } // Print other associations allRelation(opt, RelationType.COMPOSED, c); allRelation(opt, RelationType.NAVCOMPOSED, c); allRelation(opt, RelationType.HAS, c); allRelation(opt, RelationType.NAVHAS, c); allRelation(opt, RelationType.ASSOC, c); allRelation(opt, RelationType.NAVASSOC, c); allRelation(opt, RelationType.DEPEND, c); }
for (Type interfaceType : classDoc.interfaceTypes()) { classNode.getInterface().add(parseTypeInfo(interfaceType));
Type[] implIntfacs = classDoc.interfaceTypes(); if( implIntfacs != null && implIntfacs.length > 0 )
Type[] implIntfacs = classDoc.interfaceTypes(); if (implIntfacs != null && implIntfacs.length > 0) { int counter = 0;