1 43 44 package org.jfree.xml.factory.objects; 45 46 51 public class StringObjectDescription extends AbstractObjectDescription { 52 53 56 public StringObjectDescription() { 57 super(String .class); 58 setParameterDefinition("value", String .class); 59 } 60 61 66 public Object createObject() { 67 final String o = (String ) getParameter("value"); 68 return String.valueOf(o); 69 } 70 71 78 public void setParameterFromObject(final Object o) throws ObjectFactoryException { 79 if (!(o instanceof String )) { 80 throw new ObjectFactoryException("The given object is no java.lang.String."); 81 } 82 83 setParameter("value", String.valueOf(o)); 84 } 85 } 86 | Popular Tags |