From 7a4a0aea28729eabf1d44f58b0cfa4255f160992 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 25 Jun 2023 07:37:53 +0200 Subject: GlueGen: Rename GlueEmitter.getConfig{uration->}() and drop JavaEmitter.getConfig(), cleaning up API usage --- src/java/com/jogamp/gluegen/DebugEmitter.java | 2 +- src/java/com/jogamp/gluegen/GlueEmitter.java | 2 +- src/java/com/jogamp/gluegen/GlueGen.java | 2 +- src/java/com/jogamp/gluegen/JavaEmitter.java | 13 +++---------- .../procaddress/ProcAddressCMethodBindingEmitter.java | 2 +- 5 files changed, 7 insertions(+), 14 deletions(-) (limited to 'src/java/com') diff --git a/src/java/com/jogamp/gluegen/DebugEmitter.java b/src/java/com/jogamp/gluegen/DebugEmitter.java index 046c2b6..9824462 100644 --- a/src/java/com/jogamp/gluegen/DebugEmitter.java +++ b/src/java/com/jogamp/gluegen/DebugEmitter.java @@ -56,7 +56,7 @@ public class DebugEmitter implements GlueEmitter { } @Override - public JavaConfiguration getConfiguration() { return cfg; } + public JavaConfiguration getConfig() { return cfg; } @Override public void beginEmission(final GlueEmitterControls controls) { diff --git a/src/java/com/jogamp/gluegen/GlueEmitter.java b/src/java/com/jogamp/gluegen/GlueEmitter.java index 0e8d61f..8844a33 100644 --- a/src/java/com/jogamp/gluegen/GlueEmitter.java +++ b/src/java/com/jogamp/gluegen/GlueEmitter.java @@ -50,7 +50,7 @@ import com.jogamp.gluegen.cgram.types.*; public interface GlueEmitter { public void readConfigurationFile(String filename) throws Exception; - public JavaConfiguration getConfiguration(); + public JavaConfiguration getConfig(); /** * Begin the emission of glue code. This might include opening files, diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java index 2370db3..872214d 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -131,7 +131,7 @@ public class GlueGen implements GlueEmitterControls { for (final String config : cfgFiles) { emit.readConfigurationFile(config); } - final JavaConfiguration cfg = emit.getConfiguration(); + final JavaConfiguration cfg = emit.getConfig(); final File out = File.createTempFile("CPPTemp", ".cpp"); final FileOutputStream outStream = new FileOutputStream(out); diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 4fcec8f..9ef739c 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -159,7 +159,7 @@ public class JavaEmitter implements GlueEmitter { } @Override - public JavaConfiguration getConfiguration() { return cfg; } + public JavaConfiguration getConfig() { return cfg; } class ConstFuncRenamer implements SymbolFilter { private List constants; @@ -407,13 +407,6 @@ public class JavaEmitter implements GlueEmitter { return new JavaConfiguration(); } - /** - * Get the configuration information for this JavaEmitter. - */ - protected JavaConfiguration getConfig() { - return cfg; - } - /** * Generates the public emitters for this MethodBinding which will * produce either simply signatures (for the interface class, if @@ -576,7 +569,7 @@ public class JavaEmitter implements GlueEmitter { cfg.allStatic(), (binding.needsNIOWrappingOrUnwrapping() || hasPrologueOrEpilogue), !cfg.useNIODirectOnly(binding.getName()), - machDescJava, getConfiguration()); + machDescJava, getConfig()); prepCEmitter(binding.getName(), binding.getJavaReturnType(), cEmitter); allEmitters.add(cEmitter); } @@ -1518,7 +1511,7 @@ public class JavaEmitter implements GlueEmitter { false, true, false, // forIndirectBufferAndArrayImplementation - machDescJava, getConfiguration()); + machDescJava, getConfig()); cEmitter.setIsCStructFunctionPointer(true); prepCEmitter(returnSizeLookupName, binding.getJavaReturnType(), cEmitter); cEmitter.emit(); diff --git a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java index c3c374f..3bca7fe 100644 --- a/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/procaddress/ProcAddressCMethodBindingEmitter.java @@ -82,7 +82,7 @@ public class ProcAddressCMethodBindingEmitter extends CMethodBindingEmitter { true, methodToWrap.forIndirectBufferAndArrayImplementation(), methodToWrap.getMachineDataInfo(), - emitter.getConfiguration() + emitter.getConfig() ); if (methodToWrap.getReturnValueCapacityExpression() != null) { setReturnValueCapacityExpression(methodToWrap.getReturnValueCapacityExpression()); -- cgit v1.2.3