/*
 * Type.java January 2007
 *
 * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General 
 * Public License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 * Boston, MA  02111-1307  USA
 */

package simple.xml.load;

/**
 * The <code>Type</code> object describes a type that is represented 
 * by an XML element. This enables a <code>Strategy</code> to define
 * not only the type an element represents, but also defines how that
 * type can be created. This allows objects that do not have default
 * no argument constructors to be created during deserialization.
 * <p>
 * Typically the <code>getInstance</code> method acts as a proxy to 
 * the classes new instance method, which takes no arguments. Simply
 * delegating to <code>Class.newInstance</code> will sometimes not
 * be sufficient, is such cases reflectively acquiring the classes
 * constructor may be required in order to pass arguments.
 * 
 * @author Niall Gallagher
 * 
 * @see simple.xml.load.Strategy
 */
public interface Type {
	
	/**
	 * This method is used to acquire an instance of the type that
	 * is defined by this object. If for some reason the type can
	 * not be instantiated an exception is thrown from this.
	 * 
	 * @return an instance of the type this object represents
	 */
	public Object getInstance() throws Exception;
	
	/**
	 * This is the type of the object instance that will be created
	 * by the <code>getInstance</code> method. This allows the 
	 * deserialization process to perform checks against the field.
	 * 
	 * @return the type of the object that will be instantiated
	 */
	public Class getType();
}

@@ -1568,24 +1568,30 @@
  Type %7B%0A
-%09%0A%09
+   %0A   
 /**%0A
-%09
+   
  * This 
@@ -1645,17 +1645,19 @@
 pe that%0A
-%09
+   
  * is de
@@ -1710,17 +1710,19 @@
 ype can%0A
-%09
+   
  * not b
@@ -1770,22 +1770,26 @@
 m this.%0A
-%09
+   
  * %0A
-%09
+   
  * @retu
@@ -1838,22 +1838,26 @@
 resents%0A
-%09
+   
  */%0A
-%09
+   
 public O
@@ -1898,16 +1898,22 @@
 on;%0A
-%09%0A%09
+   %0A   
 /**%0A
-%09
+   
  * T
@@ -1972,17 +1972,19 @@
 created%0A
-%09
+   
  * by th
@@ -2035,17 +2035,19 @@
 ws the %0A
-%09
+   
  * deser
@@ -2106,14 +2106,18 @@
 ld.%0A
-%09
+   
  * %0A
-%09
+   
  * @
@@ -2176,14 +2176,18 @@
 ted%0A
-%09
+   
  */%0A
-%09
+   
 publ

Remove tabs.