public final class GeneratorUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
GeneratorUtils.MojoParserCallback
ParserCallback implementation.
|
| Modifier | Constructor and Description |
|---|---|
private |
GeneratorUtils() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static java.lang.String |
decodeJavadocTags(java.lang.String description)
Decodes javadoc inline tags into equivalent HTML tags.
|
static java.lang.String |
discoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Find the best package name, based on the number of hits of actual Mojo classes.
|
static void |
element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value) |
static void |
element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value,
boolean asText) |
static boolean |
isMavenReport(java.lang.String impl,
org.apache.maven.project.MavenProject project) |
static java.lang.String |
makeHtmlValid(java.lang.String description)
Fixes some javadoc comment to become a valid XHTML snippet.
|
private static java.lang.String |
quoteReplacement(java.lang.String s)
Returns a literal replacement
String for the specified String. |
static java.util.List<org.codehaus.plexus.component.repository.ComponentDependency> |
toComponentDependencies(java.util.List<org.apache.maven.model.Dependency> dependencies) |
static java.lang.String |
toText(java.lang.String html)
Converts a HTML fragment as extracted from a javadoc comment to a plain text string.
|
static void |
writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) |
public static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
w - not null writerpluginDescriptor - not nullpublic static void element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value)
w - not null writername - not nullvalue - could be nullpublic static void element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value,
boolean asText)
public static java.util.List<org.codehaus.plexus.component.repository.ComponentDependency> toComponentDependencies(java.util.List<org.apache.maven.model.Dependency> dependencies)
dependencies - not null list of Dependencyprivate static java.lang.String quoteReplacement(java.lang.String s)
String for the specified String. This method
produces a String that will work as a literal replacement s in the
appendReplacement method of the Matcher class. The String produced will
match the sequence of characters in s treated as a literal sequence. Slashes ('\') and dollar
signs ('$') will be given no special meaning. TODO: copied from Matcher class of Java 1.5, remove once target
platform can be upgradeds - The string to be literalizedstatic java.lang.String decodeJavadocTags(java.lang.String description)
<A&B>" should be
rendered as "<A&B>".description - The javadoc description to decode, may be null.null.public static java.lang.String makeHtmlValid(java.lang.String description)
description - Javadoc description with HTML tags, may be null.null.public static java.lang.String toText(java.lang.String html)
html - The HTML fragment to convert to plain text, may be null.null.public static java.lang.String discoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
pluginDescriptor - not nullpublic static boolean isMavenReport(java.lang.String impl,
org.apache.maven.project.MavenProject project)
throws java.lang.IllegalArgumentException
impl - a Mojo implementation, not nullproject - a MavenProject instance, could be nulltrue is the Mojo implementation implements MavenReport,
false otherwise.java.lang.IllegalArgumentException - if any