📄 contentfactory.java.svn-base
字号:
/* * ContentFactory.java * * Created on 2007-10-31, 17:47:23 * * To change this template, choose Tools | Templates * and open the template in the editor. */package com.s7turn.sdk.content;/** * * @author Long */public abstract class ContentFactory { //protected static Log logger = LogFactory.getLogger( ContentFactory.class ); public final static String CONTENT_FACTORY = "com.s7turn.contentProviderFactory"; public abstract ContentProvider createProvider(); public static ContentFactory createFactory() throws ContentException { try { ///select the contentFactory from system.properties; String className = System.getProperties().getProperty( CONTENT_FACTORY ); Class cnf = Class.forName(className); Object factory = cnf.newInstance(); if (factory instanceof ContentFactory) { return (ContentFactory) factory; } throw new ContentException( "Can not find the ContentProviderFactory." ); } catch (InstantiationException ex) { throw new ContentException( ex.getMessage(), ex ); } catch (IllegalAccessException ex) { throw new ContentException( ex.getMessage(), ex ); } catch (ClassNotFoundException ex) { throw new ContentException( ex.getMessage(), ex ); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -