Class JavaJavadocMojoDescriptorExtractor

    • Constructor Detail

      • JavaJavadocMojoDescriptorExtractor

        public JavaJavadocMojoDescriptorExtractor()
    • Method Detail

      • validateParameter

        protected void validateParameter​(org.apache.maven.plugin.descriptor.Parameter parameter,
                                         int i)
                                  throws org.apache.maven.plugin.descriptor.InvalidParameterException
        Parameters:
        parameter - not null
        i - positive number
        Throws:
        org.apache.maven.plugin.descriptor.InvalidParameterException - if any
      • createMojoDescriptor

        protected org.apache.maven.plugin.descriptor.MojoDescriptor createMojoDescriptor​(com.thoughtworks.qdox.model.JavaClass javaClass)
                                                                                  throws org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
        Parameters:
        javaClass - not null
        Returns:
        a mojo descriptor
        Throws:
        org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
      • getBooleanTagValue

        private static boolean getBooleanTagValue​(com.thoughtworks.qdox.model.JavaClass javaClass,
                                                  java.lang.String tagName,
                                                  boolean defaultValue)
        Parameters:
        javaClass - not null
        tagName - not null
        defaultValue - the wanted default value
        Returns:
        the boolean value of the given tagName
        See Also:
        findInClassHierarchy(JavaClass, String)
      • getBooleanTagValue

        private static boolean getBooleanTagValue​(com.thoughtworks.qdox.model.JavaClass javaClass,
                                                  java.lang.String tagName,
                                                  boolean defaultForTag,
                                                  boolean defaultValue)
        Parameters:
        javaClass - not null
        tagName - not null
        defaultForTag - The wanted default value when only the tagname is present
        defaultValue - the wanted default value when the tag is not specified
        Returns:
        the boolean value of the given tagName
        See Also:
        findInClassHierarchy(JavaClass, String)
      • findInClassHierarchy

        private static com.thoughtworks.qdox.model.DocletTag findInClassHierarchy​(com.thoughtworks.qdox.model.JavaClass javaClass,
                                                                                  java.lang.String tagName)
        Parameters:
        javaClass - not null
        tagName - not null
        Returns:
        docletTag instance
      • extractParameters

        private void extractParameters​(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor,
                                       com.thoughtworks.qdox.model.JavaClass javaClass)
                                throws org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
        Parameters:
        mojoDescriptor - not null
        javaClass - not null
        Throws:
        org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
      • extractFieldParameterTags

        private java.util.Map<java.lang.String,​com.thoughtworks.qdox.model.JavaField> extractFieldParameterTags​(com.thoughtworks.qdox.model.JavaClass javaClass)
        extract fields that are either parameters or components.
        Parameters:
        javaClass - not null
        Returns:
        map with Mojo parameters names as keys
      • execute

        public java.util.List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute​(PluginToolsRequest request)
                                                                                  throws ExtractionException,
                                                                                         org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
        Execute the mojo extraction.
        Specified by:
        execute in interface MojoDescriptorExtractor
        Parameters:
        request - The PluginToolsRequest containing information for the extraction process.
        Returns:
        a list of mojo descriptors.
        Throws:
        ExtractionException - if any
        org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
      • discoverClasses

        protected java.util.Collection<com.thoughtworks.qdox.model.JavaClass> discoverClasses​(PluginToolsRequest request)
        Parameters:
        request - The plugin request.
        Returns:
        an array of java class
      • validate

        protected void validate​(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor)
                         throws org.apache.maven.plugin.descriptor.InvalidParameterException
        Parameters:
        mojoDescriptor - not null
        Throws:
        org.apache.maven.plugin.descriptor.InvalidParameterException - if any