当前位置: 首页>>代码示例>>Java>>正文


Java Utils.getNIOBufferType方法代码示例

本文整理汇总了Java中org.lwjgl.util.generator.Utils.getNIOBufferType方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.getNIOBufferType方法的具体用法?Java Utils.getNIOBufferType怎么用?Java Utils.getNIOBufferType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.util.generator.Utils的用法示例。


在下文中一共展示了Utils.getNIOBufferType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateClearsFromParameters

import org.lwjgl.util.generator.Utils; //导入方法依赖的package包/类
private static void generateClearsFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) {
	for (ParameterDeclaration param : method.getParameters()) {
		CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class);
		if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) {
			Class nio_type = Utils.getNIOBufferType(param.getType());
			String reference_name = Utils.getReferenceName(interface_decl, method, param);
			writer.println("\t\tthis." + reference_name + " = null;");
		}
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:GLReferencesGeneratorProcessorFactory.java

示例2: generateCopiesFromParameters

import org.lwjgl.util.generator.Utils; //导入方法依赖的package包/类
private static void generateCopiesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) {
	for (ParameterDeclaration param : method.getParameters()) {
		CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class);
		if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) {
			Class nio_type = Utils.getNIOBufferType(param.getType());
			String reference_name = Utils.getReferenceName(interface_decl, method, param);
			writer.print("\t\t\tthis." + reference_name + " = ");
			writer.println(REFERENCES_PARAMETER_NAME + "." + reference_name + ";");
		}
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:GLReferencesGeneratorProcessorFactory.java

示例3: generateReferencesFromParameters

import org.lwjgl.util.generator.Utils; //导入方法依赖的package包/类
private static void generateReferencesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) {
	for (ParameterDeclaration param : method.getParameters()) {
		CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class);
		if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) {
			Class nio_type = Utils.getNIOBufferType(param.getType());
			if (nio_type == null)
				throw new RuntimeException(param + " in method " + method + " in " + interface_decl + " is annotated with "
						+ cached_reference_annotation.annotationType().getSimpleName() + " but the parameter is not a NIO buffer");
			writer.print("\t" + nio_type.getName() + " " + Utils.getReferenceName(interface_decl, method, param));
			writer.println(";");
		}
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:14,代码来源:GLReferencesGeneratorProcessorFactory.java


注:本文中的org.lwjgl.util.generator.Utils.getNIOBufferType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。