blob: db31132cefad771ed6aaa33dc23f85023bb7986c [file] [log] [blame]
## ------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
## api-method-enum.vm
/*
* Camel ApiMethod Enumeration generated by camel-api-component-maven-plugin
* Generated on: $generatedDate
*/
package $packageName;
import java.lang.reflect.Method;
import java.util.List;
import $proxyType.CanonicalName;
import org.apache.camel.util.component.ApiMethod;
import org.apache.camel.util.component.ApiMethodArg;
import org.apache.camel.util.component.ApiMethodImpl;
import static org.apache.camel.util.component.ApiMethodArg.arg;
/**
* Camel {@link ApiMethod} Enumeration for $proxyType.Name
*/
public enum $enumName implements ApiMethod {
#foreach ( $model in $models )
${model.UniqueName}(
$helper.getType($model.ResultType),
"$model.Name"#foreach ( $arg in $model.Arguments ),
arg("$arg.Name", $helper.getType($arg.Type))#end)#if ( $foreach.hasNext ),$newLine#else;#end
#end
$newLine
private final ApiMethod apiMethod;
private ${enumName}(Class<?> resultType, String name, ApiMethodArg... args) {
this.apiMethod = new ApiMethodImpl(${proxyType.SimpleName}.class, resultType, name, args);
}
@Override
public String getName() { return apiMethod.getName(); }
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
@Override
public List<String> getArgNames() { return apiMethod.getArgNames(); }
@Override
public List<Class<?>> getArgTypes() { return apiMethod.getArgTypes(); }
@Override
public Method getMethod() { return apiMethod.getMethod(); }
}