com.sun.beans.finder.ClassFinder Java Examples
The following examples show how to use
com.sun.beans.finder.ClassFinder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Introspector.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #2
Source File: DocumentHandler.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #3
Source File: Beans.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #4
Source File: Introspector.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #5
Source File: Introspector.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #6
Source File: DocumentHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #7
Source File: Introspector.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #8
Source File: Introspector.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #9
Source File: Beans.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #10
Source File: Introspector.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #11
Source File: Introspector.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #12
Source File: Beans.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #13
Source File: DocumentHandler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #14
Source File: Beans.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #15
Source File: Introspector.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #16
Source File: Beans.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #17
Source File: DocumentHandler.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #18
Source File: Beans.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #19
Source File: Introspector.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #20
Source File: Introspector.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #21
Source File: DocumentHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #22
Source File: Beans.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #23
Source File: Introspector.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #24
Source File: Introspector.java From hottub with GNU General Public License v2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #25
Source File: Beans.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #26
Source File: Introspector.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }
Example #27
Source File: Introspector.java From Java8CN with Apache License 2.0 | 5 votes |
private static Class<?> findCustomizerClass(Class<?> type) { String name = type.getName() + "Customizer"; try { type = ClassFinder.findClass(name, type.getClassLoader()); // Each customizer should inherit java.awt.Component and implement java.beans.Customizer // according to the section 9.3 of JavaBeans™ specification if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) { return type; } } catch (Exception exception) { // ignore any exceptions } return null; }
Example #28
Source File: DocumentHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Resolves class by name using current class loader. * This method handles exception using current exception listener. * * @param name the name of the class * @return the object that represents the class */ public Class<?> findClass(String name) { try { return ClassFinder.resolveClass(name, getClassLoader()); } catch (ClassNotFoundException exception) { handleException(exception); return null; } }
Example #29
Source File: Beans.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Use the given ClassLoader rather than using the system class */ @SuppressWarnings("rawtypes") protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException { String cname = classDesc.getName(); return ClassFinder.resolveClass(cname, this.loader); }
Example #30
Source File: Introspector.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Try to create an instance of a named class. * First try the classloader of "sibling", then try the system * classloader then the class loader of the current Thread. */ static Object instantiate(Class<?> sibling, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException { // First check with sibling's classloader (if any). ClassLoader cl = sibling.getClassLoader(); Class<?> cls = ClassFinder.findClass(className, cl); return cls.newInstance(); }