Examples of GLreturn


Examples of org.lwjgl.util.generator.opengl.GLreturn

      method_name = OVERLOADED_METHOD_PREFIX + method_name;
    return method_name;
  }

  static boolean isReturnParameter(MethodDeclaration method, ParameterDeclaration param) {
    GLreturn string_annotation = method.getAnnotation(GLreturn.class);
    if ( string_annotation == null || !string_annotation.value().equals(param.getSimpleName()) )
      return false;

    if ( param.getAnnotation(OutParameter.class) == null )
      throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method);

    if ( param.getAnnotation(Check.class) != null )
      throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method);

    if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 )
      throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method);

    return true;
  }
View Full Code Here

Examples of org.lwjgl.util.generator.opengl.GLreturn

      method_name = OVERLOADED_METHOD_PREFIX + method_name;
    return method_name;
  }

  static boolean isReturnParameter(MethodDeclaration method, ParameterDeclaration param) {
    GLreturn string_annotation = method.getAnnotation(GLreturn.class);
    if ( string_annotation == null || !string_annotation.value().equals(param.getSimpleName()) )
      return false;

    if ( param.getAnnotation(OutParameter.class) == null )
      throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method);

    if ( param.getAnnotation(Check.class) != null )
      throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method);

    if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 )
      throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method);

    return true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.