
vertx-groovy.template.groovy.templ Maven / Gradle / Ivy
@includeNamed{"common.templ"}
@comment{"This is where the generation starts"}
@comment{"==================================="}
/*\n
* Copyright 2014 Red Hat, Inc.\n
*\n
* Red Hat licenses this file to you under the Apache License, version 2.0\n
* (the "License"); you may not use this file except in compliance with the\n
* License. You may obtain a copy of the License at:\n
*\n
* http://www.apache.org/licenses/LICENSE-2.0\n
*\n
* Unless required by applicable law or agreed to in writing, software\n
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\n
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n
* License for the specific language governing permissions and limitations\n
* under the License.\n
*/\n\n
package @{type.raw.translatePackageName("groovy")};\n
@comment{'the current index of the cache'}
@code{cacheDecls=new java.util.ArrayList()}
@declare{'invokeDelegate'}
@if{method.staticMethod}@{type.raw}@else{}@includeNamed{'rewriteDelegate';method=method}@end{}.@{method.name}(@foreach{param: method.params}@includeNamed{'paramArgument';param=param}@end{', '})
@end{}
@declare{'rewriteDelegate'}
@if{method.ownerTypes.size() > 1}
( /* Work around for https://jira.codehaus.org/browse/GROOVY-6970 */ (@{method.ownerTypes.iterator().next().name}) this.delegate)
@else{method.ownerTypes.iterator().next() == type && concrete}
this.delegate
@else{}
((@{method.ownerTypes.iterator().next().name}) this.delegate)
@end{}
@end{}
@declare{'paramTemplate'}
@if{param.type.kind == CLASS_DATA_OBJECT}
Map @{param.name}@if{defaultDataObject} = [:]@end{}
@else{param.type.kind == CLASS_JSON_OBJECT}
Map @{param.name}
@else{param.type.kind == CLASS_JSON_ARRAY}
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy