diff options
Diffstat (limited to 'src/java/com/sun')
3 files changed, 15 insertions, 15 deletions
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java index bcda048..48964b0 100644 --- a/src/java/com/sun/gluegen/JavaEmitter.java +++ b/src/java/com/sun/gluegen/JavaEmitter.java @@ -821,7 +821,7 @@ public class JavaEmitter implements GlueEmitter { writer.println(" return create(BufferFactory.newDirectByteBuffer(size()));"); writer.println(" }"); writer.println(); - writer.println(" public static " + containingTypeName + " create(ByteBuffer buf) {"); + writer.println(" public static " + containingTypeName + " create(java.nio.ByteBuffer buf) {"); writer.println(" if (CPU.is32Bit()) {"); writer.println(" return new " + containingTypeName + "32(buf);"); writer.println(" } else {"); @@ -829,15 +829,15 @@ public class JavaEmitter implements GlueEmitter { writer.println(" }"); writer.println(" }"); writer.println(); - writer.println(" " + containingTypeName + "(ByteBuffer buf) {"); + writer.println(" " + containingTypeName + "(java.nio.ByteBuffer buf) {"); writer.println(" accessor = new StructAccessor(buf);"); writer.println(" }"); writer.println(); - writer.println(" public ByteBuffer getBuffer() {"); + writer.println(" public java.nio.ByteBuffer getBuffer() {"); writer.println(" return accessor.getBuffer();"); writer.println(" }"); } else { - writer.println(" " + containingTypeName + suffix + "(ByteBuffer buf) {"); + writer.println(" " + containingTypeName + suffix + "(java.nio.ByteBuffer buf) {"); writer.println(" super(buf);"); writer.println(" }"); writer.println(); 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];"); diff --git a/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java index 71382bf..12a6c0e 100755 --- a/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java @@ -247,10 +247,10 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding 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 (returnType.isString() || returnType.isNIOByteBuffer()) { writer.print(returnType); |