⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 factory.java

📁 world wind java sdk 源码
💻 JAVA
字号:
package gov.nasa.worldwind;/** * General factory interface. * * @author tag * @version $Id: Factory.java 9411 2009-03-16 21:03:25Z tgaskins $ */public interface Factory{    /**     * Create an object given its class name.     *     * @param className the fully qualified class name of the class to create.     *     * @return an instance of the requested class.     *     * @throws gov.nasa.worldwind.exception.WWRuntimeException     *          if the class cannont be created for any reason.     */    Object createFromClassName(String className);    /**     * Create a component from a specified configuration file.     *     * @param fileName the path to the configuration file. The file must be either an absolute path or a relative path     *                 available on the classpath.     *     * @return an instance of the requested class.     *     * @throws gov.nasa.worldwind.exception.WWRuntimeException     *          if the class cannont be created for any reason.     */    Object createFromConfigFile(String fileName);    /**     * Creates a component using one of several specified configuration mechanisms. The factory determines which     * mechanism to use, but typically attempts the specified ones in the order given until one is successful.     * <p/>     * A key can be any unique string that identifies a creation source or mechanism. An example is {@link     * gov.nasa.worldwind.avlist.AVKey#EARTH_ELEVATION_MODEL_CONFIG_FILE}, which causes the factory to look up via     * {@link Configuration} the name of the configuration file given by this key. Another example is {@link     * gov.nasa.worldwind.avlist.AVKey#EARTH_ELEVATION_MODEL_CLASS_NAME}, which tells the factory to create an instance     * of the class whose name is determined by looking up the key in {@link Configuration}. The characters at the end     * of these strings are "ConfigFile" and "ClassName", respectively. These trailing characters indicate to the     * factory the type of creation mechanism to use. Factories can implement any similar scheme.     *     * @param sourceKeys an array of keys identifying the mechanisms to use to create the component.     *     * @return the requested component.     *     * @throws IllegalArgumentException if the key array is null or empty.     * @throws gov.nasa.worldwind.exception.WWRuntimeException     *                                  if none of the methods are successful.     */    Object createFromKeys(String[] sourceKeys);}

⌨️ 快捷键说明

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