Package org.apache.camel.maven.packaging
Class TypeConverterLoaderGeneratorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.AbstractGeneratorMojo
org.apache.camel.maven.packaging.TypeConverterLoaderGeneratorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate-type-converter-loader",
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=PROCESS_CLASSES)
public class TypeConverterLoaderGeneratorMojo
extends AbstractGeneratorMojo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Filestatic final org.jboss.jandex.DotNameprotected Fileprotected FileFields inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
buildContext, GENERATED_MSG, NL, project, projectHelperFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionTypeConverterLoaderGeneratorMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.build.BuildContext buildContext) -
Method Summary
Modifier and TypeMethodDescriptionasPrimitiveType(org.jboss.jandex.MethodInfo method) voidexecute()getGenericArgumentsForTypeConvertible(org.jboss.jandex.MethodInfo method) This generates the template arguments for the type convertible.getToMethod(org.jboss.jandex.MethodInfo method) booleanisAllowNull(org.jboss.jandex.MethodInfo element) booleanisFallbackCanPromote(org.jboss.jandex.MethodInfo element) toJavaFallback(org.jboss.jandex.MethodInfo converter, Set<String> converterClasses) toString(org.jboss.jandex.Type type) Methods inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
addResourceDirectory, cache, canonicalClassName, createProperties, createProperties, execute, findConfigurations, format, getProjectClassLoader, haveResourcesChanged, isJsonFile, loadClass, newTreeSet, refresh, refresh, updateResource, updateResource, velocityMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
CONVERTER_ANNOTATION
public static final org.jboss.jandex.DotName CONVERTER_ANNOTATION -
classesDirectory
-
sourcesOutputDir
-
resourcesOutputDir
@Parameter(defaultValue="${project.basedir}/src/generated/resources") protected File resourcesOutputDir
-
-
Constructor Details
-
TypeConverterLoaderGeneratorMojo
@Inject public TypeConverterLoaderGeneratorMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.build.BuildContext buildContext)
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getGenericArgumentsForTypeConvertible
This generates the template arguments for the type convertible.- Parameters:
method- The converter method- Returns:
- A string with the converter arguments
-
getToMethod
-
asPrimitiveType
-
toString
-
toJava
-
toJavaFallback
-
isFallbackCanPromote
public boolean isFallbackCanPromote(org.jboss.jandex.MethodInfo element) -
isAllowNull
public boolean isAllowNull(org.jboss.jandex.MethodInfo element)
-