Package org.lwjgl.util.generator

Examples of org.lwjgl.util.generator.CachedReference


      }
    }

    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;");
        }
      }
View Full Code Here


      }
    }

    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 + ";");
        }
View Full Code Here

      }
    }

    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(";");
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.lwjgl.util.generator.CachedReference

Copyright © 2018 www.massapicom. 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.