Interface ConverterContext

    • Method Detail

      • getModuleName

        java.util.Optional<java.lang.String> getModuleName()
        Returns:
        the module name of the container class
      • getPackageName

        java.lang.String getPackageName()
        Returns:
        the package name of the container class
      • isReferencedBy

        boolean isReferencedBy​(FullyQualifiedJavadocReference reference)
        Parameters:
        reference -
        Returns:
        true in case either the current container class or any of its super classes are referenced
      • getLocation

        java.lang.String getLocation()
        Returns:
        a location text (human readable) indicating where in the container class the conversion is triggered (should be as specific as possible to ease debugging)
      • resolveReference

        FullyQualifiedJavadocReference resolveReference​(JavadocReference reference)
        Resolves a given javadoc reference, according to the rules of Javadoc's search order.
        Parameters:
        reference - the reference to resolve
        Returns:
        the resolved fully qualified reference
        Throws:
        java.lang.IllegalArgumentException - in case the reference cannot be resolved
      • getUrl

        java.net.URI getUrl​(FullyQualifiedJavadocReference reference)
        Returns a (deep-)link to the javadoc page for the given reference
        Parameters:
        reference - the reference for which to get the url
        Returns:
        the link
        Throws:
        java.lang.IllegalArgumentException - in case no javadoc link could be generated for the given reference
        java.lang.IllegalStateException - in case no javadoc source sites have been configured (i.e. canGetUrl() returns false)
      • getStaticFieldValue

        java.lang.String getStaticFieldValue​(FullyQualifiedJavadocReference reference)
        Returns the value of a referenced static field.
        Parameters:
        reference - the code reference towards a static field
        Returns:
        the value of the static field given by the reference
        Throws:
        java.lang.IllegalArgumentException - in case the reference does not point to a valid static field
      • getInternalJavadocSiteBaseUrl

        java.net.URI getInternalJavadocSiteBaseUrl()
        Returns the base url to use for internal javadoc links
        Returns:
        the base url for internal javadoc links (may be null).
      • setAttribute

        <T> T setAttribute​(java.lang.String name,
                           T value)
        Stores some attribute in the current context
        Type Parameters:
        T -
        Parameters:
        name -
        value -
        Returns:
        the old attribute value or null.
      • getAttribute

        <T> T getAttribute​(java.lang.String name,
                           java.lang.Class<T> clazz,
                           T defaultValue)
        Retrieves some attribute value from the current context.
        Type Parameters:
        T -
        Parameters:
        name -
        clazz -
        defaultValue -
        Returns:
        the value of the attribute with the given name or null if it does not exist