Class BaseApiConverter

  • All Implemented Interfaces:
    ApiConverter
    Direct Known Subclasses:
    JavaApiConverter, RubyApiConverter

    public abstract class BaseApiConverter
    extends Object
    implements ApiConverter
    Base class for API converters, stores a base URL
    Version:
    $Id: BaseApiConverter.java 7707 2006-04-12 17:30:19Z ian@caret.cam.ac.uk $
    Author:
    Stephan J. Schmidt
    • Field Detail

      • baseUrl

        protected String baseUrl
    • Constructor Detail

      • BaseApiConverter

        public BaseApiConverter()
    • Method Detail

      • appendUrl

        public abstract void appendUrl​(Writer writer,
                                       String className)
                                throws IOException
        Description copied from interface: ApiConverter
        Converts a class name to an url and adds the url to an Writer. The url usually shows som API information about the class e.g. for Java classes this points to the API documentation on the Sun site.
        Specified by:
        appendUrl in interface ApiConverter
        Parameters:
        writer - Writer to add the class url to
        className - Namee of the class to create pointer for
        Throws:
        IOException
      • setBaseUrl

        public void setBaseUrl​(String baseUrl)
        Description copied from interface: ApiConverter
        Set the base Url for the Converter. A converter creates an API pointer by combining an base url and the name of a class.
        Specified by:
        setBaseUrl in interface ApiConverter
        Parameters:
        baseUrl - Url to use when creating an API pointer
      • getBaseUrl

        public String getBaseUrl()
        Description copied from interface: ApiConverter
        Get the base Url for the Converter. A converter creates an API pointer by combining an base url and the name of a class.
        Specified by:
        getBaseUrl in interface ApiConverter
        Returns:
        baseUrl Url the converter uses when creating an API pointer
      • getName

        public abstract String getName()
        Description copied from interface: ApiConverter
        Returns the name of the converter. This is used to configure the BaseUrls and associate them with a concrete converter.
        Specified by:
        getName in interface ApiConverter
        Returns:
        name Name of the Converter, e.g. Java12