From d285de0ba49563ea2d7515d192147b129b201598 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 12 Oct 2015 08:13:43 +0200 Subject: Streamline Composed Pipeline's interfaces and implementations (Trace* Debug*) Only add the required direct interfaces / implementations to interface / class derivations, not polluting overview in IDEs. Aligns w/ commit bf76b6b77f078178fc5e6a42c70d354369004b94 --- .../gluegen/opengl/BuildComposablePipeline.java | 35 +++++----------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java index 9381d318b..9f885e55d 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java @@ -391,35 +391,16 @@ public class BuildComposablePipeline { final PrintWriter output = new PrintWriter(new BufferedWriter(new FileWriter(file))); - final List> baseInterfaces = Arrays.asList(baseInterfaceClass.getInterfaces()); - final HashSet> clazzList = new HashSet>(); - clazzList.add(baseInterfaceClass); - clazzList.addAll(baseInterfaces); - final int ifNamesNumber = clazzList.size(); - - // keep original order .. - clazzList.clear(); - final String[] ifNames = new String[ifNamesNumber]; - { - int i = 0; - - for (final Iterator> iter = baseInterfaces.iterator(); iter.hasNext();) { - final Class ifClass = iter.next(); - if (!clazzList.contains(ifClass)) { - ifNames[i++] = ifClass.getName(); - clazzList.add(ifClass); - } - } + final HashSet> importClazzList = new HashSet>(); + importClazzList.add(baseInterfaceClass); + final String[] ifNames = new String[] { baseInterfaceClass.getName() }; - if ( !clazzList.contains(baseInterfaceClass) ) { - ifNames[i++] = baseInterfaceClass.getName(); - clazzList.add(baseInterfaceClass); - } - } + final List> baseInterfaces = Arrays.asList(baseInterfaceClass.getInterfaces()); + importClazzList.addAll(baseInterfaces); - clazzList.add(downstreamClass); + importClazzList.add(downstreamClass); if (null != prologClassOpt) { - clazzList.add(prologClassOpt); + importClazzList.add(prologClassOpt); } final ArrayList imports = new ArrayList(); @@ -427,7 +408,7 @@ public class BuildComposablePipeline { imports.add("com.jogamp.opengl.*"); imports.add("com.jogamp.gluegen.runtime.*"); imports.add(Buffer.class.getPackage().getName()+".*"); - for (final Class clasS : clazzList) { + for (final Class clasS : importClazzList) { imports.add(clasS.getName()); } -- cgit v1.2.3