本文整理汇总了Java中org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration.getType方法的典型用法代码示例。如果您正苦于以下问题:Java ParameterDeclaration.getType方法的具体用法?Java ParameterDeclaration.getType怎么用?Java ParameterDeclaration.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration
的用法示例。
在下文中一共展示了ParameterDeclaration.getType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: signature
import org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration; //导入方法依赖的package包/类
public static Signature signature(final ExecutableDeclaration it) {
String _simpleName = it.getSimpleName();
Iterable<? extends ParameterDeclaration> _parameters = it.getParameters();
final Function1<ParameterDeclaration, TypeReference> _function = (ParameterDeclaration p) -> {
return p.getType();
};
Iterable<TypeReference> _map = IterableExtensions.map(_parameters, _function);
return CommonQueries.signature(_simpleName, ((TypeReference[])Conversions.unwrapArray(_map, TypeReference.class)));
}
示例2: signature
import org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration; //导入方法依赖的package包/类
public static Signature signature(final ExecutableDeclaration it) {
String _simpleName = it.getSimpleName();
List<? extends ParameterDeclaration> _parameters = it.getParameters();
final Function1<ParameterDeclaration,TypeReference> _function = new Function1<ParameterDeclaration,TypeReference>() {
public TypeReference apply(final ParameterDeclaration p) {
TypeReference _type = p.getType();
return _type;
}
};
List<TypeReference> _map = ListExtensions.map(_parameters, _function);
Signature _signature = ASTExtensions.signature(_simpleName, ((TypeReference[])Conversions.unwrapArray(_map, TypeReference.class)));
return _signature;
}
示例3: fieldFriendlyName
import org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration; //导入方法依赖的package包/类
private static String fieldFriendlyName(final ParameterDeclaration it) {
TypeReference _type = it.getType();
Type _type_1 = _type.getType();
String _qualifiedName = _type_1.getQualifiedName();
return _qualifiedName.replaceAll("\\.", "_");
}