本文整理汇总了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;");
}
}
}
示例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 + ";");
}
}
}
示例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(";");
}
}
}