diff options
author | Kenneth Russel <[email protected]> | 2008-04-19 17:34:04 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-04-19 17:34:04 +0000 |
commit | c047af44ab42520ee1a4d9911d5e3bc72dbf884a (patch) | |
tree | 4d51ce92f3a0972b36e1f7af788ee0c30d934ed8 /src/java/com/sun/gluegen/JavaMethodBindingEmitter.java | |
parent | cb0b5d8b93e7ca266707f2256ca4d4a555938ecd (diff) |
Fixed Issue 6: unqualified class names in generated java code
Applied and expanded patch from user tck to fully qualify all
references to New I/O classes in generated code. Tested by removing
Import of java.nio.* from JOGL and JOAL; required modification of the
custom Java code for those packages, but otherwise working well.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@73 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/JavaMethodBindingEmitter.java')
-rw-r--r-- | src/java/com/sun/gluegen/JavaMethodBindingEmitter.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java index 08da5d5..8629371 100644 --- a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java @@ -464,10 +464,10 @@ public class JavaMethodBindingEmitter extends FunctionEmitter if (!returnType.isVoid()) { if (returnType.isCompoundTypeWrapper() || returnType.isNIOByteBuffer()) { - writer.println("ByteBuffer _res;"); + writer.println("java.nio.ByteBuffer _res;"); needsResultAssignment = true; } else if (returnType.isArrayOfCompoundTypeWrappers()) { - writer.println("ByteBuffer[] _res;"); + writer.println("java.nio.ByteBuffer[] _res;"); needsResultAssignment = true; } else if ((epilogue != null) && (epilogue.size() > 0)) { emitReturnType(writer); @@ -484,9 +484,9 @@ public class JavaMethodBindingEmitter extends FunctionEmitter } if (needsResultAssignment) { - writer.print(" _res = "); + writer.print(" _res = "); } else { - writer.print(" "); + writer.print(" "); if (!returnType.isVoid()) { writer.print("return "); } @@ -624,9 +624,9 @@ public class JavaMethodBindingEmitter extends FunctionEmitter String fmt = getReturnedArrayLengthExpression(); writer.println(" if (_res == null) return null;"); if (fmt == null) { - writer.print(" return " + returnType.getName() + ".create(_res.order(ByteOrder.nativeOrder()))"); + writer.print(" return " + returnType.getName() + ".create(_res.order(java.nio.ByteOrder.nativeOrder()))"); } else { - writer.println(" _res.order(ByteOrder.nativeOrder());"); + writer.println(" _res.order(java.nio.ByteOrder.nativeOrder());"); String expr = new MessageFormat(fmt).format(argumentNameArray()); PointerType cReturnTypePointer = binding.getCReturnType().asPointer(); CompoundType cReturnType = null; @@ -644,8 +644,8 @@ public class JavaMethodBindingEmitter extends FunctionEmitter // compound types (rounding up to machine-dependent alignment) writer.println(" _res.position(_count * " + getReturnTypeString(true) + ".size());"); writer.println(" _res.limit ((1 + _count) * " + getReturnTypeString(true) + ".size());"); - writer.println(" ByteBuffer _tmp = _res.slice();"); - writer.println(" _tmp.order(ByteOrder.nativeOrder());"); + writer.println(" java.nio.ByteBuffer _tmp = _res.slice();"); + writer.println(" _tmp.order(java.nio.ByteOrder.nativeOrder());"); writer.println(" _res.position(0);"); writer.println(" _res.limit(_res.capacity());"); writer.println(" _retarray[_count] = " + getReturnTypeString(true) + ".create(_tmp);"); @@ -655,7 +655,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter writer.println(";"); } else if (returnType.isNIOBuffer()) { writer.println(" if (_res == null) return null;"); - writer.println(" return _res.order(ByteOrder.nativeOrder());"); + writer.println(" return _res.order(java.nio.ByteOrder.nativeOrder());"); } else if (returnType.isArrayOfCompoundTypeWrappers()) { writer.println(" if (_res == null) return null;"); writer.println(" " + getReturnTypeString(false) + " _retarray = new " + getReturnTypeString(true) + "[_res.length];"); |