public class DefaultTargetPlatformFactory extends Object implements TargetPlatformFactory
# # TargetPlatformFactory template. # # The format of each entry is as follows: # # <interface>[,name[,arch]] = <implementation> # # Where: # . interface - is the fully qualified interface or class name # . name - is the platform name corresponding to those defined in com.izforge.izpack.util.Platforms, as # lowercase # . arch - is the platform architecture corresponding to com.izforge.izpack.util.Platform.Arch, as # lowercase # . implementation - is the implementation of the interface for the platform # # E.g.: # com.izforge.izpack.util.os.NativeWrapper,windows = com.izforge.izpack.util.os.WinWrapper # com.izforge.izpack.util.os.NativeWrapper,windows,x64 = com.izforge.izpack.util.os.Win64Wrapper # com.izforge.izpack.util.os.NativeWrapper,windows_xp = com.izforge.izpack.util.os.Windows7Wrapper # com.izforge.izpack.util.os.NativeWrapper,windows_7,x86 = com.izforge.izpack.util.os.Windows7x86Wrapper # com.izforge.izpack.util.os.NativeWrapper,windows_7,x64 = com.izforge.izpack.util.os.Windows7x64Wrapper # com.izforge.izpack.util.os.NativeWrapper,unix = com.izforge.izpack.util.os.GenericUnixWrapper # com.izforge.izpack.util.os.NativeWrapper,debian_linux = com.izforge.izpack.util.os.DebianLinuxWrapper # com.izforge.izpack.util.os.NativeWrapper,mac_osx = com.izforge.izpack.util.os.MacOSXWrapper # com.izforge.izpack.util.os.NativeWrapper = com.izforge.izpack.util.os.DefaultWrapper
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultTargetPlatformFactory.Implementations
Manages implementations of a class/interface, for multiple platforms.
|
protected static class |
DefaultTargetPlatformFactory.Parser
Properties parser.
|
| Constructor and Description |
|---|
DefaultTargetPlatformFactory(ObjectFactory factory,
Platform platform,
Platforms platforms)
Constructs a DefaultTargetPlatformFactory, configured from TargetPlatformFactory.properties
resources.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(Properties properties,
URL url)
Adds the configuration from the specified URL.
|
<T> T |
create(Class<T> clazz)
Creates a platform specific implementation of a class, for the current platform.
|
<T> T |
create(Class<T> type,
Platform platform)
Creates a platform specific instance of a class, for the specified platform.
|
protected DefaultTargetPlatformFactory.Parser |
createParser(Platforms platforms,
URL url)
Creates a new parser.
|
protected <T> Class<T> |
getImplementation(Class<T> type,
Platform platform)
Returns the implementation of a type for the specified platform.
|
protected DefaultTargetPlatformFactory.Implementations |
getImplementations(Class clazz)
Returns the implementations registered for the specified class.
|
public DefaultTargetPlatformFactory(ObjectFactory factory, Platform platform, Platforms platforms)
factory - the factory to delegate toplatform - the current platformplatforms - the platform factorypublic <T> T create(Class<T> clazz) throws Exception
create in interface TargetPlatformFactoryclazz - the class to create a platform specific instance ofException - for any errorpublic <T> T create(Class<T> type, Platform platform) throws Exception
create in interface TargetPlatformFactorytype - the type to create a platform specific instance ofplatform - the platformException - for any errorprotected <T> Class<T> getImplementation(Class<T> type, Platform platform) throws ClassNotFoundException
type - the typeplatform - the platformClassNotFoundException - if a class is registered but cannot be foundIllegalStateException - if no class is registered, or the registered class does not implement nor
extend typeprotected void add(Properties properties, URL url)
properties - the configurationurl - the URL, for error reporting. May be nullprotected DefaultTargetPlatformFactory.Parser createParser(Platforms platforms, URL url)
platforms - the platformsurl - the source URLprotected DefaultTargetPlatformFactory.Implementations getImplementations(Class clazz)
clazz - the classCopyright © 2001–2025. All rights reserved.