Package org.apache.camel.maven
Class AbstractApiMethodGeneratorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.camel.maven.AbstractGeneratorMojo
-
- org.apache.camel.maven.AbstractSourceGeneratorMojo
-
- org.apache.camel.maven.AbstractApiMethodBaseMojo
-
- org.apache.camel.maven.AbstractApiMethodGeneratorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
JavaSourceApiMethodGeneratorMojo
public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBaseMojo
Base Mojo class for ApiMethod generators.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ApiMethodAlias>aliasesMethod alias patterns for all APIs.protected StringapiDescriptionprotected StringapiNameprotected StringclassPrefixprotected booleanconsumerOnlyprotected String[]nullableOptionsNames of options that can be set to null value if not specified.protected booleanproducerOnlyprotected StringproxyClass-
Fields inherited from class org.apache.camel.maven.AbstractApiMethodBaseMojo
excludeConfigNames, excludeConfigTypes, extraOptions, substitutions
-
Fields inherited from class org.apache.camel.maven.AbstractSourceGeneratorMojo
addCompileSourceRoots, generatedSrcDir, generatedTestDir
-
Fields inherited from class org.apache.camel.maven.AbstractGeneratorMojo
COMPONENT_PACKAGE, componentName, componentPackage, log, OUT_PACKAGE, outPackage, PREFIX, project, scheme
-
-
Constructor Summary
Constructors Constructor Description AbstractApiMethodGeneratorMojo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.support.component.ApiMethodParsercreateAdapterParser(Class proxyType)voidexecuteInternal()Template Method which assumesAbstractGeneratorMojo.projectClassLoaderis set.StringgetAliases()StringgetApiDescription(String apiDescription)FilegetApiMethodFile()StringgetApiMethods(List<org.apache.camel.support.component.ApiMethodParser.ApiMethodModel> models)static StringgetApiMethodsForParam(List<org.apache.camel.support.component.ApiMethodParser.ApiMethodModel> models, org.apache.camel.support.component.ApiMethodArg argument)StringgetApiName(String apiName)org.apache.camel.support.component.ArgumentSubstitutionParser.Substitution[]getArgumentSubstitutions()static StringgetBeanPropertySuffix(String parameter)StringgetCanonicalName(org.apache.camel.support.component.ApiMethodArg argument)static StringgetDefaultArgValue(Class<?> aClass)StringgetDoc(org.apache.camel.support.component.ApiMethodArg argument)StringgetExchangePropertyPrefix()Class<?>getProxyType()static StringgetResultDeclaration(Class<?> resultType)abstract List<SignatureModel>getSignatureList()static StringgetTestName(org.apache.camel.support.component.ApiMethodParser.ApiMethodModel model)static StringgetType(Class<?> clazz)booleanhasDoc(org.apache.camel.support.component.ApiMethodArg argument)booleanisOptionalParameter(org.apache.camel.support.component.ApiMethodArg argument)static booleanisVoidType(Class<?> resultType)-
Methods inherited from class org.apache.camel.maven.AbstractSourceGeneratorMojo
setCompileSourceRoots
-
Methods inherited from class org.apache.camel.maven.AbstractGeneratorMojo
execute, getCanonicalName, getEngine, getProjectClassLoader, mergeTemplate, refresh, setProjectClassLoader, updateResource
-
-
-
-
Field Detail
-
proxyClass
@Parameter(required=true, property="org.apache.camel.proxyClass") protected String proxyClass
-
classPrefix
@Parameter protected String classPrefix
-
apiName
@Parameter protected String apiName
-
apiDescription
@Parameter protected String apiDescription
-
consumerOnly
@Parameter protected boolean consumerOnly
-
producerOnly
@Parameter protected boolean producerOnly
-
aliases
@Parameter protected List<ApiMethodAlias> aliases
Method alias patterns for all APIs.
-
nullableOptions
@Parameter protected String[] nullableOptions
Names of options that can be set to null value if not specified.
-
-
Method Detail
-
executeInternal
public void executeInternal() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractGeneratorMojoTemplate Method which assumesAbstractGeneratorMojo.projectClassLoaderis set.- Specified by:
executeInternalin classAbstractGeneratorMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createAdapterParser
protected org.apache.camel.support.component.ApiMethodParser createAdapterParser(Class proxyType)
-
getSignatureList
public abstract List<SignatureModel> getSignatureList() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProxyType
public Class<?> getProxyType() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getApiMethodFile
public File getApiMethodFile()
-
getArgumentSubstitutions
public org.apache.camel.support.component.ArgumentSubstitutionParser.Substitution[] getArgumentSubstitutions()
-
getAliases
public String getAliases()
-
getApiMethodsForParam
public static String getApiMethodsForParam(List<org.apache.camel.support.component.ApiMethodParser.ApiMethodModel> models, org.apache.camel.support.component.ApiMethodArg argument)
-
getTestName
public static String getTestName(org.apache.camel.support.component.ApiMethodParser.ApiMethodModel model)
-
isVoidType
public static boolean isVoidType(Class<?> resultType)
-
getExchangePropertyPrefix
public String getExchangePropertyPrefix()
-
hasDoc
public boolean hasDoc(org.apache.camel.support.component.ApiMethodArg argument)
-
getDoc
public String getDoc(org.apache.camel.support.component.ApiMethodArg argument)
-
isOptionalParameter
public boolean isOptionalParameter(org.apache.camel.support.component.ApiMethodArg argument)
-
getCanonicalName
public String getCanonicalName(org.apache.camel.support.component.ApiMethodArg argument)
-
getApiMethods
public String getApiMethods(List<org.apache.camel.support.component.ApiMethodParser.ApiMethodModel> models)
-
-