1 17 18 package org.apache.geronimo.common.propertyeditor; 19 20 import org.apache.geronimo.kernel.ClassLoading; 21 22 27 public class ClassEditor extends TextPropertyEditorSupport { 28 36 public Object getValue() { 37 try { 38 String className = getAsText().trim(); 40 return ClassLoading.loadClass(className, Thread.currentThread().getContextClassLoader()); 41 } catch (Exception e) { 42 throw new PropertyEditorException("Unable to resolve class " + getAsText(), e); 44 } 45 } 46 } 47 | Popular Tags |