public TypeVariable[] typeParameters() { return wrapped.typeParameters(); }
private static void addAllInterfaceTypes(Map<ClassDoc,Type> results, Type type, Type[] interfaceTypes, boolean raw, Configuration configuration) { for (int i = 0; i < interfaceTypes.length; i++) { Type interfaceType = interfaceTypes[i]; ClassDoc interfaceClassDoc = interfaceType.asClassDoc(); if (! (interfaceClassDoc.isPublic() || (configuration != null && isLinkable(interfaceClassDoc, configuration)))) { continue; } if (raw) interfaceType = interfaceType.asClassDoc(); results.put(interfaceClassDoc, interfaceType); List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration); for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) { Type superInterface = iter.next(); results.put(superInterface.asClassDoc(), superInterface); } } if (type instanceof ParameterizedType) findAllInterfaceTypes(results, (ParameterizedType) type, configuration); else if (((ClassDoc) type).typeParameters().length == 0) findAllInterfaceTypes(results, (ClassDoc) type, raw, configuration); else findAllInterfaceTypes(results, (ClassDoc) type, true, configuration); }
private static void addAllInterfaceTypes(Map<ClassDoc,Type> results, Type type, Type[] interfaceTypes, boolean raw, Configuration configuration) { for (int i = 0; i < interfaceTypes.length; i++) { Type interfaceType = interfaceTypes[i]; ClassDoc interfaceClassDoc = interfaceType.asClassDoc(); if (! (interfaceClassDoc.isPublic() || (configuration != null && isLinkable(interfaceClassDoc, configuration)))) { continue; } if (raw) interfaceType = interfaceType.asClassDoc(); results.put(interfaceClassDoc, interfaceType); List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration); for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) { Type superInterface = iter.next(); results.put(superInterface.asClassDoc(), superInterface); } } if (type instanceof AnnotatedType) type = ((AnnotatedType)type).underlyingType(); if (type instanceof ParameterizedType) findAllInterfaceTypes(results, (ParameterizedType) type, configuration); else if (((ClassDoc) type).typeParameters().length == 0) findAllInterfaceTypes(results, (ClassDoc) type, raw, configuration); else findAllInterfaceTypes(results, (ClassDoc) type, true, configuration); }
for(TypeVariable tv: c.typeParameters()) { if(tv.bounds().length > 0 ) types.addAll(Arrays.asList(tv.bounds()));
for(TypeVariable tv: c.typeParameters()) { if(tv.bounds().length > 0 ) types.addAll(Arrays.asList(tv.bounds()));
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; }
/** * Given an array of <code>ParamTag</code>s,return its string representation. * @param holder the member that holds the param tags. * @param writer the TagletWriter that will write this tag. * @return the TagletOutput representation of these <code>ParamTag</code>s. */ public Content getTagletOutput(Doc holder, TagletWriter writer) { if (holder instanceof ExecutableMemberDoc) { ExecutableMemberDoc member = (ExecutableMemberDoc) holder; Content output = getTagletOutput(false, member, writer, member.typeParameters(), member.typeParamTags()); output.addContent(getTagletOutput(true, member, writer, member.parameters(), member.paramTags())); return output; } else { ClassDoc classDoc = (ClassDoc) holder; return getTagletOutput(false, classDoc, writer, classDoc.typeParameters(), classDoc.typeParamTags()); } }
/** * Given an array of <code>ParamTag</code>s,return its string representation. * @param holder the member that holds the param tags. * @param writer the TagletWriter that will write this tag. * @return the TagletOutput representation of these <code>ParamTag</code>s. */ public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) { if (holder instanceof ExecutableMemberDoc) { ExecutableMemberDoc member = (ExecutableMemberDoc) holder; TagletOutput output = getTagletOutput(false, member, writer, member.typeParameters(), member.typeParamTags()); output.appendOutput(getTagletOutput(true, member, writer, member.parameters(), member.paramTags())); return output; } else { ClassDoc classDoc = (ClassDoc) holder; return getTagletOutput(false, classDoc, writer, classDoc.typeParameters(), classDoc.typeParamTags()); } }
classNode.setScope(parseScope(classDoc)); for (TypeVariable typeVariable : classDoc.typeParameters()) { classNode.getGeneric().add(parseTypeParameter(typeVariable));
vars = linkInfo.type.asParameterizedType().typeArguments(); } else if (linkInfo.classDoc != null){ vars = linkInfo.classDoc.typeParameters(); } else {
TypeVariable[] typeVariables; if (doc instanceof ClassDoc) { typeVariables = ((ClassDoc) doc).typeParameters(); } else if (doc instanceof WildcardType) { Type[] extendsBounds = ((WildcardType) doc).extendsBounds();
TypeVariable[] typeVariables; if (doc instanceof ClassDoc) { typeVariables = ((ClassDoc) doc).typeParameters(); } else if (doc instanceof WildcardType) { Type[] extendsBounds = ((WildcardType) doc).extendsBounds();
vars = linkInfo.type.asParameterizedType().typeArguments(); } else if (linkInfo.classDoc != null){ vars = linkInfo.classDoc.typeParameters(); } else {