com.mucommander.runtime
Class JavaVersion
java.lang.Object
com.mucommander.runtime.RuntimeProperty
com.mucommander.runtime.ComparableRuntimeProperty
com.mucommander.runtime.JavaVersion
- All Implemented Interfaces:
- JavaVersions, java.lang.Comparable
public class JavaVersion
- extends ComparableRuntimeProperty
- implements JavaVersions
This class represents a major version of Java, like Java 1.5 for instance. The current runtime instance
is determined using the value of the java.version system property.
Being a ComparableRuntimeProperty, versions of Java are ordered and can be compared
against each other.
- Author:
- Maxence Bernard
- See Also:
JavaVersions
|
Constructor Summary |
protected |
JavaVersion(java.lang.String stringRepresentation,
int intValue)
|
|
Method Summary |
static JavaVersion |
getCurrent()
Returns the Java version of the current runtime environment. |
protected RuntimeProperty |
getCurrentValue()
Returns the current runtime environment's value of this runtime property. |
static java.lang.String |
getRawSystemProperty()
Returns the value of the system property which serves to detect the Java version at runtime. |
static void |
init()
Determines the current value by parsing the corresponding system property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JavaVersion
protected JavaVersion(java.lang.String stringRepresentation,
int intValue)
init
public static void init()
- Determines the current value by parsing the corresponding system property. This method is called automatically
by this class the first time the current value is accessed. However, this method has been made public to allow
to force the initialization if it needs to happen at a predictable time.
getCurrent
public static JavaVersion getCurrent()
- Returns the Java version of the current runtime environment.
- Returns:
- the Java version of the current runtime environment
getRawSystemProperty
public static java.lang.String getRawSystemProperty()
- Returns the value of the system property which serves to detect the Java version at runtime.
- Returns:
- the value of the system property which serves to detect the Java version at runtime.
getCurrentValue
protected RuntimeProperty getCurrentValue()
- Description copied from class:
RuntimeProperty
- Returns the current runtime environment's value of this runtime property.
- Specified by:
getCurrentValue in class RuntimeProperty
- Returns:
- the current runtime environment's value of this runtime property
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard