summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-02-02 00:23:09 +0000
committerKenneth Russel <[email protected]>2005-02-02 00:23:09 +0000
commit944a1c9ff172c5187f8d489b9f687417bb6af953 (patch)
tree32d5e96e0f923b9ac8a598b92cbfa5a2b44b1891 /src/net/java/games/gluegen/JavaMethodBindingEmitter.java
parentdf6b1b78a80fbf95e6c6e8c946bc899b75312153 (diff)
Merged in changes from Blackbird branch: refactoring and rewriting of
portions of GlueGen for more flexibility. Also fixed source-level problems associated with making GLCapabilities' clone() not throw CloneNotSupportedException. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@202 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/gluegen/JavaMethodBindingEmitter.java')
-rw-r--r--src/net/java/games/gluegen/JavaMethodBindingEmitter.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
index 131faae0d..e5b83a26c 100644
--- a/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
+++ b/src/net/java/games/gluegen/JavaMethodBindingEmitter.java
@@ -66,7 +66,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter
private String runtimeExceptionType;
private MethodBinding binding;
- private boolean forNIOBufferBaseRoutine;
+ private boolean forImplementingMethodCall;
// A non-null value indicates that rather than returning a compound
// type accessor we are returning an array of such accessors; this
@@ -80,18 +80,26 @@ public class JavaMethodBindingEmitter extends FunctionEmitter
this(binding, output, runtimeExceptionType, false);
}
- public JavaMethodBindingEmitter(MethodBinding binding, PrintWriter output, String runtimeExceptionType, boolean forNIOBufferBaseRoutine)
+ public JavaMethodBindingEmitter(MethodBinding binding, PrintWriter output, String runtimeExceptionType, boolean forImplementingMethodCall)
{
super(output);
this.binding = binding;
- this.forNIOBufferBaseRoutine = forNIOBufferBaseRoutine;
+ this.forImplementingMethodCall = forImplementingMethodCall;
this.runtimeExceptionType = runtimeExceptionType;
setCommentEmitter(defaultInterfaceCommentEmitter);
}
+ public JavaMethodBindingEmitter(JavaMethodBindingEmitter arg) {
+ super(arg);
+ runtimeExceptionType = arg.runtimeExceptionType;
+ binding = arg.binding;
+ forImplementingMethodCall = arg.forImplementingMethodCall;
+ returnedArrayLengthExpression = arg.returnedArrayLengthExpression;
+ }
+
public final MethodBinding getBinding() { return binding; }
- public final boolean isForNIOBufferBaseRoutine() { return forNIOBufferBaseRoutine; }
+ public boolean isForImplementingMethodCall() { return forImplementingMethodCall; }
public String getName() {
return binding.getName();
@@ -130,9 +138,10 @@ public class JavaMethodBindingEmitter extends FunctionEmitter
protected void emitName(PrintWriter writer)
{
- writer.print(binding.getName());
- if (forNIOBufferBaseRoutine) {
- writer.print("0");
+ if (forImplementingMethodCall) {
+ writer.print(getImplMethodName());
+ } else {
+ writer.print(getName());
}
}
@@ -141,7 +150,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter
boolean needComma = false;
int numEmitted = 0;
- if (forNIOBufferBaseRoutine && binding.hasContainingType()) {
+ if (forImplementingMethodCall && binding.hasContainingType()) {
// Always emit outgoing "this" argument
writer.print("java.nio.Buffer ");
writer.print(javaThisArgumentName());