metadatafactory.java.svn-base

来自「一些公用的Java函数」· SVN-BASE 代码 · 共 55 行

SVN-BASE
55
字号
/* * MetadataFactory.java *  * Created on 2007-11-4, 22:25:37 *  * To change this template, choose Tools | Templates * and open the template in the editor. */package com.s7turn.sdk.content;import com.s7turn.logging.Logger;/** * * @author Long */public abstract class MetadataFactory {    private static MetadataFactory factory;    public static MetadataFactory createInstance( String facName )    {        try        {            if( factory == null )            {                Object obj = Class.forName(facName).newInstance();                if (obj instanceof MetadataFactory)                {                    factory = (MetadataFactory) obj;                }            }        }        catch (ClassNotFoundException ex)        {                        Logger.getLogger(MetadataFactory.class).debug( "Exception: %s", ex );            //Logger.getLogger(MetadataFactory.class.getName()).log(Level.SEVERE, null, ex);        }        catch (InstantiationException ex)        {            Logger.getLogger(MetadataFactory.class).debug( "Exception: %s", ex );            //Logger.getLogger(MetadataFactory.class.getName()).log(Level.SEVERE, null, ex);        }        catch (IllegalAccessException ex)        {            Logger.getLogger(MetadataFactory.class).debug( "Exception: %s", ex );            //Logger.getLogger(MetadataFactory.class.getName()).log(Level.SEVERE, null, ex);        }        return factory;    }        public abstract MetadataProvider createProvider();    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?