// Simple editors, without parameterization capabilities. // The JDK does not contain a default editor for any of these target types. this.defaultEditors.put(Class.class, new ClassEditor()); this.defaultEditors.put(File.class, new FileEditor()); this.defaultEditors.put(InputStream.class, new InputStreamEditor()); this.defaultEditors.put(Locale.class, new LocaleEditor()); this.defaultEditors.put(Properties.class, new PropertiesEditor()); this.defaultEditors.put(Resource[].class, new ResourceArrayPropertyEditor()); this.defaultEditors.put(String[].class, new StringArrayPropertyEditor()); this.defaultEditors.put(URL.class, new URLEditor());
/** * Create a default ClassEditor, using the given ClassLoader. * @param classLoader the ClassLoader to use * (or <code>null</code> for the thread context ClassLoader) */ public ClassEditor(ClassLoader classLoader) { this.classLoader = (classLoader !=null? classLoader : Thread.currentThread().getContextClassLoader()); }
/** * Map keyed by class containing CachedIntrospectionResults. * Needs to be a WeakHashMap with WeakReferences as values to allow * for proper garbage collection in case of multiple class loaders. */ privatestaticfinal Map classCache = Collections.synchronizedMap(new WeakHashMap());