📄 metadatafactory.java.svn-base
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -