1 16 package org.directwebremoting.create; 17 18 import org.directwebremoting.extend.Creator; 19 import org.directwebremoting.util.LocalUtil; 20 import org.directwebremoting.util.Messages; 21 22 26 public class NullCreator extends AbstractCreator implements Creator 27 { 28 32 public void setClass(String classname) 33 { 34 try 35 { 36 this.clazz = LocalUtil.classForName(classname); 37 } 38 catch (ClassNotFoundException ex) 39 { 40 throw new IllegalArgumentException (Messages.getString("Creator.ClassNotFound", classname)); 41 } 42 } 43 44 47 public Class getType() 48 { 49 return clazz; 50 } 51 52 55 public Object getInstance() throws InstantiationException 56 { 57 throw new InstantiationException (Messages.getString("NullCreator.DontCallMe")); 58 } 59 60 private Class clazz; 61 } 62 | Popular Tags |