com.sun.tools.doclets.formats.html
Class LinkFactoryImpl

java.lang.Object
  extended by com.sun.tools.doclets.internal.toolkit.util.links.LinkFactory
      extended by com.sun.tools.doclets.formats.html.LinkFactoryImpl

public class LinkFactoryImpl
extends LinkFactory

A factory that returns a link given the information about it.

Since:
1.5

Field Summary
private  HtmlDocletWriter m_writer
           
 
Constructor Summary
LinkFactoryImpl(HtmlDocletWriter writer)
           
 
Method Summary
protected  LinkOutput getClassLink(LinkInfo linkInfo)
          Return the link to the given class.
private  java.lang.String getClassToolTip(ClassDoc classDoc, boolean isTypeLink)
          Given a class, return the appropriate tool tip.
protected  LinkOutput getOutputInstance()
          Return an empty instance of the link output object.
protected  LinkOutput getTypeParameterLink(LinkInfo linkInfo, Type typeParam)
          Return the link to the given type parameter.
private  java.lang.String pathString(LinkInfoImpl linkInfo)
          Return path to the given file name in the given package.
 
Methods inherited from class com.sun.tools.doclets.internal.toolkit.util.links.LinkFactory
getGreaterThanString, getLessThanString, getLinkOutput, getTypeParameterLinks, getTypeParameterLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_writer

private HtmlDocletWriter m_writer
Constructor Detail

LinkFactoryImpl

public LinkFactoryImpl(HtmlDocletWriter writer)
Method Detail

getOutputInstance

protected LinkOutput getOutputInstance()
Return an empty instance of the link output object.

Specified by:
getOutputInstance in class LinkFactory
Returns:
an empty instance of the link output object.

getClassLink

protected LinkOutput getClassLink(LinkInfo linkInfo)
Return the link to the given class.

Specified by:
getClassLink in class LinkFactory
Parameters:
linkInfo - the information about the link to construct.
Returns:
the link for the given class.

getTypeParameterLink

protected LinkOutput getTypeParameterLink(LinkInfo linkInfo,
                                          Type typeParam)
Return the link to the given type parameter.

Specified by:
getTypeParameterLink in class LinkFactory
Parameters:
linkInfo - the information about the link to construct.
typeParam - the type parameter to link to.

getClassToolTip

private java.lang.String getClassToolTip(ClassDoc classDoc,
                                         boolean isTypeLink)
Given a class, return the appropriate tool tip.

Parameters:
classDoc - the class to get the tool tip for.
Returns:
the tool tip for the appropriate class.

pathString

private java.lang.String pathString(LinkInfoImpl linkInfo)
Return path to the given file name in the given package. So if the name passed is "Object.html" and the name of the package is "java.lang", and if the relative path is "../.." then returned string will be "../../java/lang/Object.html"

Parameters:
linkInfo - the information about the link.
fileName - the file name, to which path string is.