/** * Return this type as a <code>TypeVariable</code> if it represents * a type variable. Array dimensions are ignored. */ public TypeVariable asTypeVariable() { return skipArrays().asTypeVariable(); }
@Override public TypeVariable asTypeVariable() { return this.underlyingType().asTypeVariable(); }
type.asTypeVariable()!= null && type.asTypeVariable().owner() instanceof ExecutableMemberDoc) { excludeTypeParameterLinks = true;
type.asTypeVariable()!= null && type.asTypeVariable().owner() instanceof ExecutableMemberDoc){ excludeTypeParameterLinks = true;
/** * For backward compatibility, include an anchor using the erasures of the * parameters. NOTE: We won't need this method anymore after we fix * see tags so that they use the type instead of the erasure. * * @param emd the ExecutableMemberDoc to anchor to. * @return the 1.4.x style anchor for the ExecutableMemberDoc. */ protected String getErasureAnchor(ExecutableMemberDoc emd) { StringBuffer buf = new StringBuffer(emd.name() + "("); Parameter[] params = emd.parameters(); boolean foundTypeVariable = false; for (int i = 0; i < params.length; i++) { if (i > 0) { buf.append(","); } Type t = params[i].type(); foundTypeVariable = foundTypeVariable || t.asTypeVariable() != null; buf.append(t.isPrimitive() ? t.typeName() : t.asClassDoc().qualifiedName()); buf.append(t.dimension()); } buf.append(")"); return foundTypeVariable ? buf.toString() : null; } }
/** * For backward compatibility, include an anchor using the erasures of the * parameters. NOTE: We won't need this method anymore after we fix * see tags so that they use the type instead of the erasure. * * @param emd the ExecutableMemberDoc to anchor to. * @return the 1.4.x style anchor for the ExecutableMemberDoc. */ protected String getErasureAnchor(ExecutableMemberDoc emd) { StringBuilder buf = new StringBuilder(emd.name() + "("); Parameter[] params = emd.parameters(); boolean foundTypeVariable = false; for (int i = 0; i < params.length; i++) { if (i > 0) { buf.append(","); } Type t = params[i].type(); foundTypeVariable = foundTypeVariable || t.asTypeVariable() != null; buf.append(t.isPrimitive() ? t.typeName() : t.asClassDoc().qualifiedName()); buf.append(t.dimension()); } buf.append(")"); return foundTypeVariable ? writer.getName(buf.toString()) : null; } }
if (setter.parameters()[0].type().asTypeVariable() == null) { commentTextBuilder.append("(").append(typeName).append(")");
public Content getTypeAnnotationLinks(LinkInfo linkInfo) { ContentBuilder links = new ContentBuilder(); AnnotationDesc[] annotations; if (linkInfo.type instanceof AnnotatedType) { annotations = linkInfo.type.asAnnotatedType().annotations(); } else if (linkInfo.type instanceof TypeVariable) { annotations = linkInfo.type.asTypeVariable().annotations(); } else { return links; } if (annotations.length == 0) return links; List<Content> annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation); boolean isFirst = true; for (Content anno : annos) { if (!isFirst) { links.addContent(" "); } links.addContent(anno); isFirst = false; } if (!annos.isEmpty()) { links.addContent(" "); } return links; }
linkOutput.append(getLinkOutput(linkInfo)); } else if (type.asTypeVariable()!= null) { linkInfo.isTypeBound = true; Doc owner = type.asTypeVariable().owner(); if ((! linkInfo.excludeTypeParameterLinks) && owner instanceof ClassDoc) { Type[] bounds = type.asTypeVariable().bounds(); if (! linkInfo.excludeTypeBounds) { linkInfo.excludeTypeBounds = true;
link.addContent(getLink(linkInfo)); } else if (type.asTypeVariable()!= null) { link.addContent(getTypeAnnotationLinks(linkInfo)); linkInfo.isTypeBound = true; Doc owner = type.asTypeVariable().owner(); if ((! linkInfo.excludeTypeParameterLinks) && owner instanceof ClassDoc) { Type[] bounds = type.asTypeVariable().bounds(); if (! linkInfo.excludeTypeBounds) { linkInfo.excludeTypeBounds = true;