diff options
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java | 35 |
1 files changed, 8 insertions, 27 deletions
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<Class<?>> baseInterfaces = Arrays.asList(baseInterfaceClass.getInterfaces()); - final HashSet<Class<?>> clazzList = new HashSet<Class<?>>(); - 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<Class<?>> iter = baseInterfaces.iterator(); iter.hasNext();) { - final Class<?> ifClass = iter.next(); - if (!clazzList.contains(ifClass)) { - ifNames[i++] = ifClass.getName(); - clazzList.add(ifClass); - } - } + final HashSet<Class<?>> importClazzList = new HashSet<Class<?>>(); + importClazzList.add(baseInterfaceClass); + final String[] ifNames = new String[] { baseInterfaceClass.getName() }; - if ( !clazzList.contains(baseInterfaceClass) ) { - ifNames[i++] = baseInterfaceClass.getName(); - clazzList.add(baseInterfaceClass); - } - } + final List<Class<?>> 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<String> imports = new ArrayList<String>(); @@ -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()); } |