/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Class
 *  java.lang.ClassLoader
 *  java.lang.Exception
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.Thread
 */
package org.dom4j.util;

import org.dom4j.util.SingletonStrategy;

public class SimpleSingleton
implements SingletonStrategy {
    private String singletonClassName = null;
    private Object singletonInstance = null;

    @Override
    public Object instance() {
        return this.singletonInstance;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    @Override
    public void reset() {
        if (this.singletonClassName == null) return;
        try {
            this.singletonInstance = Thread.currentThread().getContextClassLoader().loadClass(this.singletonClassName).newInstance();
            return;
        }
        catch (Exception var1_1) {
            try {
                this.singletonInstance = Class.forName((String)this.singletonClassName).newInstance();
                return;
            }
            catch (Exception var2_2) {
                return;
            }
        }
    }

    @Override
    public void setSingletonClassName(String string2) {
        this.singletonClassName = string2;
        this.reset();
    }
}

