Class JavaClassConverterContext

    • Constructor Summary

      Constructors 
      Constructor Description
      JavaClassConverterContext​(com.thoughtworks.qdox.model.JavaClass mojoClass, com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator, int lineNumber)  
      JavaClassConverterContext​(com.thoughtworks.qdox.model.JavaClass mojoClass, com.thoughtworks.qdox.model.JavaClass declaringClass, com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator, int lineNumber)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canGetUrl()  
      <T> T getAttribute​(java.lang.String name, java.lang.Class<T> clazz, T defaultValue)
      Retrieves some attribute value from the current context.
      java.net.URI getInternalJavadocSiteBaseUrl()
      Returns the base url to use for internal javadoc links
      java.lang.String getLocation()  
      java.util.Optional<java.lang.String> getModuleName()  
      java.lang.String getPackageName()  
      java.lang.String getStaticFieldValue​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)
      Returns the value of a referenced static field.
      java.net.URI getUrl​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)
      Returns a (deep-)link to the javadoc page for the given reference
      boolean isReferencedBy​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)  
      org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference resolveReference​(org.apache.maven.tools.plugin.javadoc.JavadocReference reference)
      Resolves a given javadoc reference, according to the rules of Javadoc's search order.
      <T> T setAttribute​(java.lang.String name, T value)
      Stores some attribute in the current context
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaClassConverterContext

        public JavaClassConverterContext​(com.thoughtworks.qdox.model.JavaClass mojoClass,
                                         com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder,
                                         java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses,
                                         org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator,
                                         int lineNumber)
      • JavaClassConverterContext

        public JavaClassConverterContext​(com.thoughtworks.qdox.model.JavaClass mojoClass,
                                         com.thoughtworks.qdox.model.JavaClass declaringClass,
                                         com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder,
                                         java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses,
                                         org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator,
                                         int lineNumber)
    • Method Detail

      • getModuleName

        public java.util.Optional<java.lang.String> getModuleName()
        Specified by:
        getModuleName in interface ConverterContext
        Returns:
        the module name of the container class
      • getPackageName

        public java.lang.String getPackageName()
        Specified by:
        getPackageName in interface ConverterContext
        Returns:
        the package name of the container class
      • getLocation

        public java.lang.String getLocation()
        Specified by:
        getLocation in interface ConverterContext
        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)
      • isReferencedBy

        public boolean isReferencedBy​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)
        Specified by:
        isReferencedBy in interface ConverterContext
        Parameters:
        reference -
        Returns:
        true in case either the current context class or any of its super classes are referenced
      • getUrl

        public java.net.URI getUrl​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)
        Description copied from interface: ConverterContext
        Returns a (deep-)link to the javadoc page for the given reference
        Specified by:
        getUrl in interface ConverterContext
        Parameters:
        reference - the reference for which to get the url
        Returns:
        the link
      • resolveReference

        public org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference resolveReference​(org.apache.maven.tools.plugin.javadoc.JavadocReference reference)
        Description copied from interface: ConverterContext
        Resolves a given javadoc reference, according to the rules of Javadoc's search order.
        Specified by:
        resolveReference in interface ConverterContext
        Parameters:
        reference - the reference to resolve
        Returns:
        the resolved fully qualified reference
      • getStaticFieldValue

        public java.lang.String getStaticFieldValue​(org.apache.maven.tools.plugin.javadoc.FullyQualifiedJavadocReference reference)
        Description copied from interface: ConverterContext
        Returns the value of a referenced static field.
        Specified by:
        getStaticFieldValue in interface ConverterContext
        Parameters:
        reference - the code reference towards a static field
        Returns:
        the value of the static field given by the reference
      • getInternalJavadocSiteBaseUrl

        public java.net.URI getInternalJavadocSiteBaseUrl()
        Description copied from interface: ConverterContext
        Returns the base url to use for internal javadoc links
        Specified by:
        getInternalJavadocSiteBaseUrl in interface ConverterContext
        Returns:
        the base url for internal javadoc links (may be null).
      • setAttribute

        public <T> T setAttribute​(java.lang.String name,
                                  T value)
        Description copied from interface: ConverterContext
        Stores some attribute in the current context
        Specified by:
        setAttribute in interface ConverterContext
        Returns:
        the old attribute value or null.
      • getAttribute

        public <T> T getAttribute​(java.lang.String name,
                                  java.lang.Class<T> clazz,
                                  T defaultValue)
        Description copied from interface: ConverterContext
        Retrieves some attribute value from the current context.
        Specified by:
        getAttribute in interface ConverterContext
        Returns:
        the value of the attribute with the given name or null if it does not exist