From: Johannes Dahlström Date: Mon, 16 Jan 2012 07:01:28 +0000 (+0000) Subject: Merged #8105 Compile core files and test files to separate folders X-Git-Tag: 7.0.0.alpha2~532^2^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=326ccadd49971a36bcf4c356f114eba70a4e337f;p=vaadin-framework.git Merged #8105 Compile core files and test files to separate folders svn changeset:22636/svn branch:6.8 --- diff --git a/build/build.properties b/build/build.properties index 82378c6dac..9e126a4479 100644 --- a/build/build.properties +++ b/build/build.properties @@ -2,7 +2,7 @@ result-path=build/result checkout-path=build/checkout product-file=vaadin product-name=Vaadin -toolkit-package=com/vaadin +vaadin-package=com/vaadin gwt-dir=lib/core/gwt # repository into which Maven snapshots should be published diff --git a/build/build.xml b/build/build.xml index 8c3ee1d04a..1fdcc0ee25 100644 --- a/build/build.xml +++ b/build/build.xml @@ -43,14 +43,32 @@ uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" /> + - - + + + + + + + + + + + + + + + + + + + @@ -86,7 +104,7 @@ - + @@ -95,9 +113,6 @@ - - - @@ -109,17 +124,16 @@ Full Version: ${version.full} - - Vaadin package is: ${toolkit-package} + Vaadin package is: ${vaadin-package} - - + + We are using gwt version ${gwt-version}. @@ -185,13 +199,17 @@ Adding test class files and resources and launcher configuration. - - - + + + + + + + - + @@ -201,8 +219,8 @@ - - + + @@ -258,11 +276,11 @@ - + - - - - + + + + @@ -316,7 +339,7 @@ Copying src directory and processing copied files. Replacing <version> tag with build version for java/html/css/xml files. - + @@ -324,13 +347,13 @@ - + - + @@ -346,17 +369,17 @@ Copying non java/html/css/xml files such as images. - + - + - + @@ -383,12 +406,11 @@ - Adding VAADIN/themes, demo and hsqldb.jar files. + Adding VAADIN/themes and META-INF - @@ -431,20 +453,37 @@ - + Compiling src (server-side) - - - - - - - + + + + + + + + + Compiling src (Server and client side JUnit tests) + + + + + + + + Compiling src (TestBench tests) + + + + + + + - + @@ -488,7 +527,7 @@ - + @@ -496,8 +535,8 @@ - - + + @@ -551,12 +590,7 @@ - - - - - - + @@ -588,18 +622,14 @@ ${gwt-version} - - - - - @@ -617,24 +647,10 @@ - - - - - - - - - - - - + + - - - - - + @@ -665,7 +681,7 @@ - + @@ -692,9 +708,7 @@ - - - + ${javadoc.doctitle} ${javadoc.bottom} @@ -784,7 +798,7 @@ - + @@ -793,8 +807,6 @@ - - Base version: ${version} Build number: ${build.number} Build tag: ${build.tag} @@ -924,7 +936,7 @@ - + @@ -944,7 +956,7 @@ - + @@ -957,38 +969,35 @@ - + - + merge="false" + > - - - - - + - - + + + - + - + @@ -1040,7 +1049,7 @@ - + diff --git a/src/com/vaadin/launcher/util/BrowserLauncher.java b/src/com/vaadin/launcher/util/BrowserLauncher.java deleted file mode 100644 index 55692cb251..0000000000 --- a/src/com/vaadin/launcher/util/BrowserLauncher.java +++ /dev/null @@ -1,127 +0,0 @@ -/* -@VaadinApache2LicenseForJavaFiles@ - */ - -package com.vaadin.launcher.util; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * This class opens default browser for DemoLauncher class. Default browser is - * detected by the operating system. - * - */ -public class BrowserLauncher { - - /** - * Open browser on specified URL. - * - * @param url - */ - public static void openBrowser(String url) { - - final Runtime runtime = Runtime.getRuntime(); - boolean started = false; - - final String os = System.getProperty("os.name", "windows") - .toLowerCase(); - - // Linux - if (os.indexOf("linux") >= 0) { - // See if the default browser is Konqueror by resolving the symlink. - boolean isDefaultKonqueror = false; - try { - // Find out the location of the x-www-browser link from path. - Process process = runtime.exec("which x-www-browser"); - BufferedInputStream ins = new BufferedInputStream( - process.getInputStream()); - BufferedReader bufreader = new BufferedReader( - new InputStreamReader(ins)); - String defaultLinkPath = bufreader.readLine(); - ins.close(); - - // The path is null if the link did not exist. - if (defaultLinkPath != null) { - // See if the default browser is Konqueror. - File file = new File(defaultLinkPath); - String canonical = file.getCanonicalPath(); - if (canonical.indexOf("konqueror") != -1) { - isDefaultKonqueror = true; - } - } - } catch (IOException e1) { - // The symlink was probably not found, so this is ok. - } - - // Try x-www-browser, which is symlink to the default browser, - // except if we found that it is Konqueror. - if (!started && !isDefaultKonqueror) { - try { - runtime.exec("x-www-browser " + url); - started = true; - } catch (final IOException e) { - } - } - - // Try firefox - if (!started) { - try { - runtime.exec("firefox " + url); - started = true; - } catch (final IOException e) { - } - } - - // Try mozilla - if (!started) { - try { - runtime.exec("mozilla " + url); - started = true; - } catch (final IOException e) { - } - } - - // Try konqueror - if (!started) { - try { - runtime.exec("konqueror " + url); - started = true; - } catch (final IOException e) { - } - } - } - - // OS X - if (os.indexOf("mac os x") >= 0) { - - // Try open - if (!started) { - try { - runtime.exec("open " + url); - started = true; - } catch (final IOException e) { - } - } - } - - // Try cmd /start command on windows - if (os.indexOf("win") >= 0) { - if (!started) { - try { - runtime.exec("cmd /c start " + url); - started = true; - } catch (final IOException e) { - } - } - } - - if (!started) { - System.out.println("Failed to open browser. Please go to " + url); - } - } - -} diff --git a/tests/server-side/com/vaadin/tests/VaadinClasses.java b/tests/server-side/com/vaadin/tests/VaadinClasses.java new file mode 100644 index 0000000000..e02c4f0b6e --- /dev/null +++ b/tests/server-side/com/vaadin/tests/VaadinClasses.java @@ -0,0 +1,236 @@ +package com.vaadin.tests; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.net.JarURLConnection; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Enumeration; +import java.util.List; +import java.util.jar.JarEntry; + +import org.junit.Test; + +import com.vaadin.Application; +import com.vaadin.ui.Component; +import com.vaadin.ui.ComponentContainer; +import com.vaadin.ui.CustomComponent; +import com.vaadin.ui.DragAndDropWrapper; +import com.vaadin.ui.HorizontalSplitPanel; +import com.vaadin.ui.LoginForm; +import com.vaadin.ui.PopupView; +import com.vaadin.ui.SplitPanel; +import com.vaadin.ui.VerticalSplitPanel; +import com.vaadin.ui.Window; + +@SuppressWarnings("deprecation") +public class VaadinClasses { + + public static void main(String[] args) { + System.out.println("ComponentContainers"); + System.out.println("==================="); + for (Class c : getComponentContainers()) { + System.out.println(c.getName()); + } + System.out.println(); + System.out.println("Components"); + System.out.println("=========="); + for (Class c : getComponents()) { + System.out.println(c.getName()); + } + System.out.println(); + System.out.println("Server side classes"); + System.out.println("==================="); + for (Class c : getAllServerSideClasses()) { + System.out.println(c.getName()); + } + } + + public static List> getComponents() { + try { + return findClasses(Component.class, "com.vaadin.ui"); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + + public static List> getAllServerSideClasses() { + try { + return findClassesNoTests(Object.class, "com.vaadin", new String[] { + "com.vaadin.tests", "com.vaadin.terminal.gwt.client" }); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + + public static List> getComponentContainers() { + try { + return findClasses(ComponentContainer.class, "com.vaadin.ui"); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + + public static List> getComponentContainersSupportingAddRemoveComponent() { + List> classes = getComponentContainers(); + classes.remove(PopupView.class); + classes.remove(CustomComponent.class); + classes.remove(DragAndDropWrapper.class); + classes.remove(CustomComponent.class); + classes.remove(LoginForm.class); + + return classes; + } + + public static List> getComponentContainersSupportingUnlimitedNumberOfComponents() { + List> classes = getComponentContainersSupportingAddRemoveComponent(); + classes.remove(SplitPanel.class); + classes.remove(VerticalSplitPanel.class); + classes.remove(HorizontalSplitPanel.class); + classes.remove(Window.class); + + return classes; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static List> getBasicComponentTests() { + try { + // Given as name to avoid dependencies on testbench source folder + return (List) findClasses( + Class.forName("com.vaadin.tests.components.AbstractComponentTest"), + "com.vaadin.tests.components"); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + } + + private static List> findClasses(Class baseClass, + String basePackage) throws IOException { + return findClasses(baseClass, basePackage, new String[] {}); + } + + private static List> findClasses(Class baseClass, + String basePackage, String[] ignoredPackages) throws IOException { + List> classes = new ArrayList>(); + String basePackageDirName = "/" + basePackage.replace('.', '/'); + URL location = Application.class.getResource(basePackageDirName); + if (location.getProtocol().equals("file")) { + try { + File f = new File(location.toURI()); + if (!f.exists()) { + throw new IOException("Directory " + f.toString() + + " does not exist"); + } + findPackages(f, basePackage, baseClass, classes, + ignoredPackages); + } catch (URISyntaxException e) { + throw new IOException(e.getMessage()); + } + } else if (location.getProtocol().equals("jar")) { + JarURLConnection juc = (JarURLConnection) location.openConnection(); + findPackages(juc, basePackage, baseClass, classes); + } + + Collections.sort(classes, new Comparator>() { + + public int compare(Class o1, Class o2) { + return o1.getName().compareTo(o2.getName()); + } + + }); + return classes; + } + + private static List> findClassesNoTests( + Class baseClass, String basePackage, String[] ignoredPackages) + throws IOException { + List> classes = findClasses(baseClass, basePackage, + ignoredPackages); + List> classesNoTests = new ArrayList>(); + for (Class clazz : classes) { + if (!clazz.getName().contains("Test")) { + boolean testPresent = false; + for (Method method : clazz.getMethods()) { + if (method.isAnnotationPresent(Test.class)) { + testPresent = true; + break; + } + } + if (!testPresent) { + classesNoTests.add(clazz); + } + } + } + return classesNoTests; + } + + private static void findPackages(JarURLConnection juc, + String javaPackage, Class baseClass, + Collection> result) throws IOException { + String prefix = "com/vaadin/ui"; + Enumeration ent = juc.getJarFile().entries(); + while (ent.hasMoreElements()) { + JarEntry e = ent.nextElement(); + if (e.getName().endsWith(".class") + && e.getName().startsWith(prefix)) { + String fullyQualifiedClassName = e.getName().replace('/', '.') + .replace(".class", ""); + addClassIfMatches(result, fullyQualifiedClassName, baseClass); + } + } + } + + private static void findPackages(File parent, String javaPackage, + Class baseClass, Collection> result, + String[] ignoredPackages) { + for (String ignoredPackage : ignoredPackages) { + if (javaPackage.equals(ignoredPackage)) { + return; + } + } + + for (File file : parent.listFiles()) { + if (file.isDirectory()) { + findPackages(file, javaPackage + "." + file.getName(), + baseClass, result, ignoredPackages); + } else if (file.getName().endsWith(".class")) { + String fullyQualifiedClassName = javaPackage + "." + + file.getName().replace(".class", ""); + addClassIfMatches(result, fullyQualifiedClassName, baseClass); + } + } + + } + + @SuppressWarnings("unchecked") + private static void addClassIfMatches( + Collection> result, + String fullyQualifiedClassName, Class baseClass) { + try { + // Try to load the class + + Class c = Class.forName(fullyQualifiedClassName); + if (baseClass.isAssignableFrom(c) + && !Modifier.isAbstract(c.getModifiers())) { + result.add((Class) c); + } + } catch (Exception e) { + // Could ignore that class cannot be loaded + e.printStackTrace(); + } catch (LinkageError e) { + // Ignore. Client side classes will at least throw LinkageErrors + } + + } +} diff --git a/tests/testbench/com/vaadin/launcher/util/BrowserLauncher.java b/tests/testbench/com/vaadin/launcher/util/BrowserLauncher.java new file mode 100644 index 0000000000..55692cb251 --- /dev/null +++ b/tests/testbench/com/vaadin/launcher/util/BrowserLauncher.java @@ -0,0 +1,127 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ + +package com.vaadin.launcher.util; + +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * This class opens default browser for DemoLauncher class. Default browser is + * detected by the operating system. + * + */ +public class BrowserLauncher { + + /** + * Open browser on specified URL. + * + * @param url + */ + public static void openBrowser(String url) { + + final Runtime runtime = Runtime.getRuntime(); + boolean started = false; + + final String os = System.getProperty("os.name", "windows") + .toLowerCase(); + + // Linux + if (os.indexOf("linux") >= 0) { + // See if the default browser is Konqueror by resolving the symlink. + boolean isDefaultKonqueror = false; + try { + // Find out the location of the x-www-browser link from path. + Process process = runtime.exec("which x-www-browser"); + BufferedInputStream ins = new BufferedInputStream( + process.getInputStream()); + BufferedReader bufreader = new BufferedReader( + new InputStreamReader(ins)); + String defaultLinkPath = bufreader.readLine(); + ins.close(); + + // The path is null if the link did not exist. + if (defaultLinkPath != null) { + // See if the default browser is Konqueror. + File file = new File(defaultLinkPath); + String canonical = file.getCanonicalPath(); + if (canonical.indexOf("konqueror") != -1) { + isDefaultKonqueror = true; + } + } + } catch (IOException e1) { + // The symlink was probably not found, so this is ok. + } + + // Try x-www-browser, which is symlink to the default browser, + // except if we found that it is Konqueror. + if (!started && !isDefaultKonqueror) { + try { + runtime.exec("x-www-browser " + url); + started = true; + } catch (final IOException e) { + } + } + + // Try firefox + if (!started) { + try { + runtime.exec("firefox " + url); + started = true; + } catch (final IOException e) { + } + } + + // Try mozilla + if (!started) { + try { + runtime.exec("mozilla " + url); + started = true; + } catch (final IOException e) { + } + } + + // Try konqueror + if (!started) { + try { + runtime.exec("konqueror " + url); + started = true; + } catch (final IOException e) { + } + } + } + + // OS X + if (os.indexOf("mac os x") >= 0) { + + // Try open + if (!started) { + try { + runtime.exec("open " + url); + started = true; + } catch (final IOException e) { + } + } + } + + // Try cmd /start command on windows + if (os.indexOf("win") >= 0) { + if (!started) { + try { + runtime.exec("cmd /c start " + url); + started = true; + } catch (final IOException e) { + } + } + } + + if (!started) { + System.out.println("Failed to open browser. Please go to " + url); + } + } + +} diff --git a/tests/testbench/com/vaadin/tests/Components.java b/tests/testbench/com/vaadin/tests/Components.java index 6987c04a54..d7bc18e2f6 100644 --- a/tests/testbench/com/vaadin/tests/Components.java +++ b/tests/testbench/com/vaadin/tests/Components.java @@ -32,7 +32,7 @@ import com.vaadin.ui.Window; public class Components extends Application { private static final Object CAPTION = "c"; - private Map>, String> tests = new HashMap>, String>(); + private Map, String> tests = new HashMap, String>(); private Tree naviTree; private HorizontalSplitPanel sp; private Window mainWindow; @@ -41,10 +41,9 @@ public class Components extends Application { private List> componentsWithoutTests = new ArrayList>(); { - for (Class> c : VaadinClasses - .getBasicComponentTests()) { + for (Class c : VaadinClasses.getBasicComponentTests()) { String testClass = c.getSimpleName(); - tests.put(c, testClass); + tests.put((Class) c, testClass); } List> componentsWithoutTest = VaadinClasses @@ -171,7 +170,7 @@ public class Components extends Application { hc.setItemSorter(sorter); naviTree.addContainerProperty(CAPTION, String.class, ""); naviTree.setItemCaptionPropertyId(CAPTION); - for (Class> cls : tests.keySet()) { + for (Class cls : tests.keySet()) { addTreeItem(cls); } hc.sort(new Object[] { CAPTION }, new boolean[] { true }); @@ -226,13 +225,13 @@ public class Components extends Application { } @SuppressWarnings("unchecked") - private void addTreeItem(Class> cls) { + private void addTreeItem(Class cls) { String name = tests.get(cls); if (name == null) { name = cls.getSimpleName(); } - Class> superClass = (Class>) cls + Class superClass = (Class) cls .getSuperclass(); // This cast is needed only to make compilation through Ant work .. @@ -249,9 +248,9 @@ public class Components extends Application { } protected Component createTestComponent( - Class> cls) { + Class cls) { try { - AbstractComponentTest t = cls.newInstance(); + AbstractComponentTest t = cls.newInstance(); t.init(); ComponentContainer c = t.getMainWindow().getContent(); t.getMainWindow().setContent(null); diff --git a/tests/testbench/com/vaadin/tests/VaadinClasses.java b/tests/testbench/com/vaadin/tests/VaadinClasses.java deleted file mode 100644 index 0f4e2ff4da..0000000000 --- a/tests/testbench/com/vaadin/tests/VaadinClasses.java +++ /dev/null @@ -1,235 +0,0 @@ -package com.vaadin.tests; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.net.JarURLConnection; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.Enumeration; -import java.util.List; -import java.util.jar.JarEntry; - -import org.junit.Test; - -import com.vaadin.Application; -import com.vaadin.tests.components.AbstractComponentTest; -import com.vaadin.ui.Component; -import com.vaadin.ui.ComponentContainer; -import com.vaadin.ui.CustomComponent; -import com.vaadin.ui.DragAndDropWrapper; -import com.vaadin.ui.HorizontalSplitPanel; -import com.vaadin.ui.LoginForm; -import com.vaadin.ui.PopupView; -import com.vaadin.ui.SplitPanel; -import com.vaadin.ui.VerticalSplitPanel; -import com.vaadin.ui.Window; - -@SuppressWarnings("deprecation") -public class VaadinClasses { - - public static void main(String[] args) { - System.out.println("ComponentContainers"); - System.out.println("==================="); - for (Class c : getComponentContainers()) { - System.out.println(c.getName()); - } - System.out.println(); - System.out.println("Components"); - System.out.println("=========="); - for (Class c : getComponents()) { - System.out.println(c.getName()); - } - System.out.println(); - System.out.println("Server side classes"); - System.out.println("==================="); - for (Class c : getAllServerSideClasses()) { - System.out.println(c.getName()); - } - } - - public static List> getComponents() { - try { - return findClasses(Component.class, "com.vaadin.ui"); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - public static List> getAllServerSideClasses() { - try { - return findClassesNoTests(Object.class, "com.vaadin", new String[] { - "com.vaadin.tests", "com.vaadin.terminal.gwt.client" }); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - public static List> getComponentContainers() { - try { - return findClasses(ComponentContainer.class, "com.vaadin.ui"); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - public static List> getComponentContainersSupportingAddRemoveComponent() { - List> classes = getComponentContainers(); - classes.remove(PopupView.class); - classes.remove(CustomComponent.class); - classes.remove(DragAndDropWrapper.class); - classes.remove(CustomComponent.class); - classes.remove(LoginForm.class); - - return classes; - } - - public static List> getComponentContainersSupportingUnlimitedNumberOfComponents() { - List> classes = getComponentContainersSupportingAddRemoveComponent(); - classes.remove(SplitPanel.class); - classes.remove(VerticalSplitPanel.class); - classes.remove(HorizontalSplitPanel.class); - classes.remove(Window.class); - - return classes; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - public static List>> getBasicComponentTests() { - try { - return (List) findClasses(AbstractComponentTest.class, - "com.vaadin.tests.components"); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - - } - - private static List> findClasses(Class baseClass, - String basePackage) throws IOException { - return findClasses(baseClass, basePackage, new String[] {}); - } - - private static List> findClasses(Class baseClass, - String basePackage, String[] ignoredPackages) throws IOException { - List> classes = new ArrayList>(); - String basePackageDirName = "/" + basePackage.replace('.', '/'); - URL location = Application.class.getResource(basePackageDirName); - if (location.getProtocol().equals("file")) { - try { - File f = new File(location.toURI()); - if (!f.exists()) { - throw new IOException("Directory " + f.toString() - + " does not exist"); - } - findPackages(f, basePackage, baseClass, classes, - ignoredPackages); - } catch (URISyntaxException e) { - throw new IOException(e.getMessage()); - } - } else if (location.getProtocol().equals("jar")) { - JarURLConnection juc = (JarURLConnection) location.openConnection(); - findPackages(juc, basePackage, baseClass, classes); - } - - Collections.sort(classes, new Comparator>() { - - public int compare(Class o1, Class o2) { - return o1.getName().compareTo(o2.getName()); - } - - }); - return classes; - } - - private static List> findClassesNoTests( - Class baseClass, String basePackage, String[] ignoredPackages) - throws IOException { - List> classes = findClasses(baseClass, basePackage, - ignoredPackages); - List> classesNoTests = new ArrayList>(); - for (Class clazz : classes) { - if (!clazz.getName().contains("Test")) { - boolean testPresent = false; - for (Method method : clazz.getMethods()) { - if (method.isAnnotationPresent(Test.class)) { - testPresent = true; - break; - } - } - if (!testPresent) { - classesNoTests.add(clazz); - } - } - } - return classesNoTests; - } - - private static void findPackages(JarURLConnection juc, - String javaPackage, Class baseClass, - Collection> result) throws IOException { - String prefix = "com/vaadin/ui"; - Enumeration ent = juc.getJarFile().entries(); - while (ent.hasMoreElements()) { - JarEntry e = ent.nextElement(); - if (e.getName().endsWith(".class") - && e.getName().startsWith(prefix)) { - String fullyQualifiedClassName = e.getName().replace('/', '.') - .replace(".class", ""); - addClassIfMatches(result, fullyQualifiedClassName, baseClass); - } - } - } - - private static void findPackages(File parent, String javaPackage, - Class baseClass, Collection> result, - String[] ignoredPackages) { - for (String ignoredPackage : ignoredPackages) { - if (javaPackage.equals(ignoredPackage)) { - return; - } - } - - for (File file : parent.listFiles()) { - if (file.isDirectory()) { - findPackages(file, javaPackage + "." + file.getName(), - baseClass, result, ignoredPackages); - } else if (file.getName().endsWith(".class")) { - String fullyQualifiedClassName = javaPackage + "." - + file.getName().replace(".class", ""); - addClassIfMatches(result, fullyQualifiedClassName, baseClass); - } - } - - } - - @SuppressWarnings("unchecked") - private static void addClassIfMatches( - Collection> result, - String fullyQualifiedClassName, Class baseClass) { - try { - // Try to load the class - - Class c = Class.forName(fullyQualifiedClassName); - if (baseClass.isAssignableFrom(c) - && !Modifier.isAbstract(c.getModifiers())) { - result.add((Class) c); - } - } catch (Exception e) { - // Could ignore that class cannot be loaded - e.printStackTrace(); - } catch (LinkageError e) { - // Ignore. Client side classes will at least throw LinkageErrors - } - - } -}