java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java
branchv_0
changeset 188 54bacc7ed42b
parent 160 84ea4a819fb2
equal deleted inserted replaced
187:65d1eb327cb1 188:54bacc7ed42b
    16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    17  */
    17  */
    18 package info.globalcode.sql.dk.configuration;
    18 package info.globalcode.sql.dk.configuration;
    19 
    19 
    20 import static info.globalcode.sql.dk.Xmlns.CONFIGURATION;
    20 import static info.globalcode.sql.dk.Xmlns.CONFIGURATION;
    21 import info.globalcode.sql.dk.DKException;
       
    22 import info.globalcode.sql.dk.formatting.Formatter;
    21 import info.globalcode.sql.dk.formatting.Formatter;
    23 import info.globalcode.sql.dk.formatting.FormatterContext;
    22 import info.globalcode.sql.dk.formatting.FormatterContext;
    24 import info.globalcode.sql.dk.formatting.FormatterException;
    23 import info.globalcode.sql.dk.formatting.FormatterException;
    25 import java.lang.reflect.Constructor;
    24 import java.lang.reflect.Constructor;
    26 import java.lang.reflect.InvocationTargetException;
    25 import java.lang.reflect.InvocationTargetException;
    89 	}
    88 	}
    90 
    89 
    91 	/**
    90 	/**
    92 	 * @param context
    91 	 * @param context
    93 	 * @return
    92 	 * @return
    94 	 * @throws DKException
    93 	 * @throws FormatterException
    95 	 */
    94 	 */
    96 	public Formatter getInstance(FormatterContext context) throws FormatterException {
    95 	public Formatter getInstance(FormatterContext context) throws FormatterException {
    97 		context.getProperties().setDefaults(properties);
    96 		context.getProperties().setDefaults(properties);
    98 		try {
    97 		try {
    99 			Constructor constructor = Class.forName(className).getConstructor(context.getClass());
    98 			Constructor constructor = Class.forName(className).getConstructor(context.getClass());