public static String getMethodReturnType(MethodDeclaration method, GLreturn return_annotation, boolean buffer) { ParameterDeclaration return_param = null; for ( ParameterDeclaration param : method.getParameters() ) { if ( param.getSimpleName().equals(return_annotation.value()) ) { return_param = param; break; } } if ( return_param == null ) throw new RuntimeException("The @GLreturn parameter \"" + return_annotation.value() + "\" could not be found in method: " + method); PrimitiveType.Kind kind = NativeTypeTranslator.getPrimitiveKindFromBufferClass(Utils.getJavaType(return_param.getType())); if ( return_param.getAnnotation(GLboolean.class) != null ) kind = PrimitiveType.Kind.BOOLEAN; if ( kind == PrimitiveType.Kind.BYTE && (return_param.getAnnotation(GLchar.class) != null || return_param.getAnnotation(GLcharARB.class) != null) ) return "String"; else { final String type = JavaTypeTranslator.getPrimitiveClassFromKind(kind).getName(); return buffer ? Character.toUpperCase(type.charAt(0)) + type.substring(1) : type; } }
@StripPostfix("data") void glGetBooleanIndexedvEXT(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data);
@Alternate("glGetBooleanIndexedvEXT") @GLreturn("data") @StripPostfix("data") void glGetBooleanIndexedvEXT2(@GLenum int value, @GLuint int index, @OutParameter @GLboolean ByteBuffer data);