/*
*  transloader
*    
*  This file is part of transloader http://code.google.com/p/transloader/ as part
*  of the java-sandbox https://sourceforge.net/p/dw-sandbox/
*
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/

package net.datenwerke.transloader.clone.reflect.instantiate;

/**
 * A strategy interface for customising how normal objects (as opposed to arrays) are instantiated by
 * {@link net.datenwerke.transloader.clone.reflect.ReflectionCloningStrategy}.
 *
 * @author Jeremy Wales
 */
public interface InstantiationStrategy {
    /**
     * Creates a new instance of the given type.
     *
     * @param type the type of which to make a new instance
     * @return the new instance of the given <code>type</code>
     * @throws Exception can throw any <code>Exception</code> depending on the implementation
     */
    Object newInstanceOf(Class type) throws Exception;
}
