Class PlatformFactory
- java.lang.Object
-
- org.eclipse.rdf4j.common.platform.PlatformFactory
-
public class PlatformFactory extends java.lang.Object
PlatformFactory creates a Platform instance corresponding with the current platform.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
logger
Platform
platform
private static PlatformFactory
sharedInstance
-
Constructor Summary
Constructors Modifier Constructor Description private
PlatformFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private Platform
createPlatform()
Tries to determine the platform we're running on based on Java system properties and/or environment variables.static PlatformFactory
getInstance()
Returns the Platform instance corresponding with the current platform.static Platform
getPlatform()
Returns the Platform instance corresponding with the current platform.private java.lang.String
getSystemEnv(java.lang.String propertyName)
Get system environment variableprivate boolean
isGnome()
Detect gnome environments.private boolean
isKDE()
Detect KDE environments.static void
main(java.lang.String[] args)
Main
-
-
-
Field Detail
-
sharedInstance
private static PlatformFactory sharedInstance
-
platform
public final Platform platform
-
logger
private final org.slf4j.Logger logger
-
-
Method Detail
-
getInstance
public static PlatformFactory getInstance()
Returns the Platform instance corresponding with the current platform.- Returns:
- factory
-
getPlatform
public static Platform getPlatform()
Returns the Platform instance corresponding with the current platform.
-
createPlatform
private Platform createPlatform()
Tries to determine the platform we're running on based on Java system properties and/or environment variables. See http://lopica.sourceforge.net/os.html for an overview.
-
isGnome
private boolean isGnome()
Detect gnome environments.- Returns:
- true when Gnome session
-
isKDE
private boolean isKDE()
Detect KDE environments.- Returns:
- true when KDE
-
getSystemEnv
private java.lang.String getSystemEnv(java.lang.String propertyName)
Get system environment variable- Parameters:
propertyName
-- Returns:
- system environment variable
-
main
public static void main(java.lang.String[] args)
Main- Parameters:
args
- arguments
-
-