01: /*
02: * $Id: Packager.java 1671 2007-01-02 10:28:58Z dreil $
03: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
04: *
05: * http://izpack.org/
06: * http://izpack.codehaus.org/
07: *
08: * Copyright 2006 Dennis Reil
09: *
10: * Licensed under the Apache License, Version 2.0 (the "License");
11: * you may not use this file except in compliance with the License.
12: * You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software
17: * distributed under the License is distributed on an "AS IS" BASIS,
18: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19: * See the License for the specific language governing permissions and
20: * limitations under the License.
21: */
22:
23: package com.izforge.izpack.compiler;
24:
25: /**
26: * Factory class for handling the packager classes
27: * @author Dennis Reil, <Dennis.Reil@reddot.de>
28: */
29: public class PackagerFactory {
30: /**
31: * Returns a new instantiation of the specified packager
32: * @param classname the class name
33: * @return a new packager instance
34: * @throws InstantiationException
35: * @throws IllegalAccessException
36: * @throws ClassNotFoundException
37: */
38: public static IPackager getPackager(String classname)
39: throws InstantiationException, IllegalAccessException,
40: ClassNotFoundException {
41: return (IPackager) Class.forName(classname).newInstance();
42: }
43: }
|