|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Factory
General factory interface.
| Method Summary | |
|---|---|
Object |
createFromClassName(String className)
Create an object given its class name. |
Object |
createFromConfigFile(String fileName)
Create a component from a specified configuration file. |
Object |
createFromKeys(String[] sourceKeys)
Creates a component using one of several specified configuration mechanisms. |
| Method Detail |
|---|
Object createFromClassName(String className)
className - the fully qualified class name of the class to create.
WWRuntimeException - if the class cannont be created for any reason.Object createFromConfigFile(String fileName)
fileName - the path to the configuration file. The file must be either an absolute path or a relative path
available on the classpath.
WWRuntimeException - if the class cannont be created for any reason.Object createFromKeys(String[] sourceKeys)
AVKey.EARTH_ELEVATION_MODEL_CONFIG_FILE, which causes the factory to look up via
Configuration the name of the configuration file given by this key. Another example is 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 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.
sourceKeys - an array of keys identifying the mechanisms to use to create the component.
IllegalArgumentException - if the key array is null or empty.
WWRuntimeException - if none of the methods are successful.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||