@@ -0,0 +1,2063 @@
+/*%0A * Type.java January 2007%0A *%0A * Copyright (C) 2007, Niall Gallagher %3Cniallg@users.sf.net%3E%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the %0A * GNU Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General %0A * Public License along with this library; if not, write to the %0A * Free Software Foundation, Inc., 59 Temple Place, Suite 330, %0A * Boston, MA  02111-1307  USA%0A */%0A%0Apackage simple.xml.load;%0A%0A/*%0A      Node entry = node.remove(label);%0A      %0A      if(entry == null) %7B%0A    %09  return null;%0A      %7D%0A      String name = entry.getValue();%0A      Class type = Class.forName(name);%0A      %0A      return new Entry(type);  %0A*/%0A/**%0A * The %3Ccode%3EType%3C/code%3E object describes a type that is represented %0A * by an XML element. This enables a %3Ccode%3EStrategy%3C/code%3E to define%0A * not only the type an element represents, but also defines how that%0A * type can be created. This allows object that do not have default%0A * no argument constructors to be created during deserialization.%0A * %0A * @author Niall Gallagher%0A * %0A * @see simple.xml.load.Strategy%0A */%0Apublic interface Type %7B%0A%09%0A%09/**%0A%09 * This method is used to acquire an instance of the type that%0A%09 * is defined by this object. If for some reason the type can%0A%09 * not be instantiated an exception is thrown from this.%0A%09 * %0A%09 * @return an instance of the type this object represents%0A%09 */%0A%09public Object getInstance() throws Exception;%0A%09%0A%09/**%0A%09 * This is the type of the object instance that will be created%0A%09 * by the %3Ccode%3EgetInstance%3C/code%3E method. This allows the %0A%09 * deserialization process to perform checks against the field.%0A%09 * %0A%09 * @return the type of the object that will be instantiated%0A%09 */%0A%09public Class getType();%0A%7D%0A

Add type for strategies.