summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-03-10 13:52:03 +0100
committerSven Gothel <[email protected]>2014-03-10 13:52:03 +0100
commit66a13b80b545e4a4107ef67ec504e4fc15138a30 (patch)
treefeca0dbfa8ce4a02829b1e6850be8b20880c795d /src
parentac954c8877592203bc928112407e2bf0f25465f3 (diff)
Minor Cleanup after merging fixes for bugs 987, 990, 992 and 994
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/gluegen/CMethodBindingEmitter.java11
-rw-r--r--src/java/com/jogamp/gluegen/JavaEmitter.java4
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/PointerType.java7
-rw-r--r--src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java3
4 files changed, 14 insertions, 11 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
index d18ea3d..242ca15 100644
--- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
@@ -61,22 +61,22 @@ public class CMethodBindingEmitter extends FunctionEmitter {
protected MethodBinding binding;
/** Name of the package in which the corresponding Java method resides.*/
- private String packageName;
+ private final String packageName;
/** Name of the class in which the corresponding Java method resides.*/
- private String className;
+ private final String className;
/**
* Whether or not the Java<->C JNI binding for this emitter's MethodBinding
* is overloaded.
*/
- private boolean isOverloadedBinding;
+ private final boolean isOverloadedBinding;
/**
* Whether or not the Java-side of the Java<->C JNI binding for this
* emitter's MethodBinding is static.
*/
- private boolean isJavaMethodStatic;
+ private final boolean isJavaMethodStatic;
// Flags which change various aspects of glue code generation
protected boolean forImplementingMethodCall;
@@ -427,8 +427,9 @@ public class CMethodBindingEmitter extends FunctionEmitter {
writer.println(" jsize _tmpArrayLen;");
// Pointer to the data in the Buffer, taking the offset into account
- if(type.isNIOBufferArray())
+ if(type.isNIOBufferArray()) {
writer.println(" int * _offsetHandle = NULL;");
+ }
emittedDataCopyTemps = true;
}
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java
index cf425cd..ec8757c 100644
--- a/src/java/com/jogamp/gluegen/JavaEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaEmitter.java
@@ -788,8 +788,10 @@ public class JavaEmitter implements GlueEmitter {
}
if (name == null) {
- if ((structType.getStructName() != null) && cfg.shouldIgnoreInInterface(structType.getStructName()))
+ final String structName = structType.getStructName();
+ if ( null != structName && cfg.shouldIgnoreInInterface(structName) ) {
return;
+ }
LOG.log(WARNING, "skipping emission of unnamed struct \"{0}\"", structType);
return;
diff --git a/src/java/com/jogamp/gluegen/cgram/types/PointerType.java b/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
index af33f41..330d791 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
@@ -41,7 +41,7 @@ package com.jogamp.gluegen.cgram.types;
public class PointerType extends Type implements Cloneable {
- private Type targetType;
+ private final Type targetType;
private String computedName;
private boolean hasTypedefedName;
@@ -121,10 +121,11 @@ public class PointerType extends Type implements Cloneable {
}
public Type getLastTargetType() {
- if(targetType.isPointer())
+ if(targetType.isPointer()) {
return ((PointerType)targetType).getLastTargetType();
- else
+ } else {
return targetType;
+ }
}
@Override
diff --git a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
index 53391e8..32f270f 100644
--- a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
+++ b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
@@ -74,8 +74,7 @@ import jogamp.common.Debug;
* User can enable DEBUG while defining property <code>jogamp.gluegen.structgen.debug</code>.
* </p>
*
- * @author Michael Bien
- * @author Sven Gothel, et.al.
+ * @author Michael Bien, et al.
*/
@SupportedAnnotationTypes(value = {"com.jogamp.gluegen.structgen.CStruct"})
@SupportedSourceVersion(SourceVersion.RELEASE_7)