Class JVM
- All Implemented Interfaces:
Caching
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.As of 1.4.5 usenewReflectionProvider()static booleanstatic booleanstatic booleanvoidDeprecated.As of 1.4.5 no functionalitystatic StringCodecGet an available Base64 implementation.static ClassGet the XMLInputFactory implementation used normally by the current Java runtime as standard.static ClassGet the XMLOutputFactory implementation used normally by the current Java runtime as standard.static booleanChecks if TreeMap.putAll is optimized for SortedMap argument.static booleanChecks if TreeSet.addAll is optimized for SortedSet argument.static booleanis14()Deprecated.As of 1.4.4, minimal JDK version is 1.4 alreadystatic booleanis15()Deprecated.As of 1.4.4, minimal JDK version will be 1.7 for next major releasestatic booleanis16()Deprecated.As of 1.4.4, minimal JDK version will be 1.7 for next major releasestatic booleanis17()Deprecated.As of 1.4.10, minimal JDK version will be 1.7 for next major releasestatic booleanis18()Deprecated.As of 1.4.11 useisVersion(int).static booleanis19()Deprecated.As of 1.4.10 useisVersion(int).static booleanis9()Deprecated.As of 1.4.11 useisVersion(int)static booleanChecks if AWT is available.static booleanChecks if SQL is available.static booleanChecks if Swing is available.static booleanisVersion(int version) Checks current runtime against provided major Java version.Deprecated.As of 1.4.5 useloadClassForName(String)Deprecated.As of 1.4.5 useloadClassForName(String, boolean)static ClassloadClassForName(String name) Load a XStream class for the given name.static ClassloadClassForName(String name, boolean initialize) Load a XStream class for the given name.static voidstatic ReflectionProviderCreate the best matching ReflectionProvider.static ReflectionProvidernewReflectionProvider(FieldDictionary dictionary) Create the best matching ReflectionProvider.static booleanDeprecated.As of 1.4.5booleanDeprecated.As of 1.4.5 useisAWTAvailable()booleanDeprecated.As of 1.4.5 useisSQLAvailable()booleanDeprecated.As of 1.4.5 useisSwingAvailable()
-
Constructor Details
-
JVM
public JVM()Deprecated.As of 1.4.5 use the static methods of JVM.
-
-
Method Details
-
is14
public static boolean is14()Deprecated.As of 1.4.4, minimal JDK version is 1.4 already -
is15
public static boolean is15()Deprecated.As of 1.4.4, minimal JDK version will be 1.7 for next major release -
is16
public static boolean is16()Deprecated.As of 1.4.4, minimal JDK version will be 1.7 for next major release -
is17
public static boolean is17()Deprecated.As of 1.4.10, minimal JDK version will be 1.7 for next major release- Since:
- 1.4
-
is18
-
is19
-
is9
-
isVersion
public static boolean isVersion(int version) Checks current runtime against provided major Java version.- Parameters:
version- the requested major Java version- Returns:
- true if current runtime is at least the provided major version
- Since:
- 1.4.11
-
loadClassForName
Load a XStream class for the given name.This method is not meant to use loading arbitrary classes. It is used by XStream bootstrap until it is able to use the user provided or the default
ClassLoader.- Since:
- 1.4.5
-
loadClass
Deprecated.As of 1.4.5 useloadClassForName(String) -
loadClassForName
Load a XStream class for the given name.This method is not meant to use loading arbitrary classes. It is used by XStream bootstrap until it is able to use the user provided or the default
ClassLoader.- Since:
- 1.4.5
-
loadClass
Deprecated.As of 1.4.5 useloadClassForName(String, boolean)- Since:
- 1.4.4
-
newReflectionProvider
Create the best matching ReflectionProvider.- Returns:
- a new instance
- Since:
- 1.4.5
-
newReflectionProvider
Create the best matching ReflectionProvider.- Parameters:
dictionary- the FieldDictionary to use by the ReflectionProvider- Returns:
- a new instance
- Since:
- 1.4.5
-
getStaxInputFactory
Get the XMLInputFactory implementation used normally by the current Java runtime as standard.In contrast to XMLInputFactory.newFactory() this method will ignore any implementations provided with the system property javax.xml.stream.XMLInputFactory, implementations configured in lib/stax.properties or registered with the Service API.
- Returns:
- the XMLInputFactory implementation or null
- Throws:
ClassNotFoundException- if the standard class cannot be found- Since:
- 1.4.5
-
getStaxOutputFactory
Get the XMLOutputFactory implementation used normally by the current Java runtime as standard.In contrast to XMLOutputFactory.newFactory() this method will ignore any implementations provided with the system property javax.xml.stream.XMLOutputFactory, implementations configured in lib/stax.properties or registered with the Service API.
- Returns:
- the XMLOutputFactory implementation or null
- Throws:
ClassNotFoundException- if the standard class cannot be found- Since:
- 1.4.5
-
getBase64Codec
Get an available Base64 implementation. Prefers java.util.Base64 over DataTypeConverter from JAXB over XStream's own implementation.- Returns:
- a Base64 codec implementation
- Since:
- 1.4.11
-
bestReflectionProvider
Deprecated.As of 1.4.5 usenewReflectionProvider() -
reverseFieldDefinition
public static boolean reverseFieldDefinition()Deprecated.As of 1.4.5 -
isAWTAvailable
public static boolean isAWTAvailable()Checks if AWT is available.- Since:
- 1.4.5
-
supportsAWT
public boolean supportsAWT()Deprecated.As of 1.4.5 useisAWTAvailable()Checks if the JVM supports AWT. -
isSwingAvailable
public static boolean isSwingAvailable()Checks if Swing is available.- Since:
- 1.4.5
-
supportsSwing
public boolean supportsSwing()Deprecated.As of 1.4.5 useisSwingAvailable()Checks if the JVM supports Swing. -
isSQLAvailable
public static boolean isSQLAvailable()Checks if SQL is available.- Since:
- 1.4.5
-
supportsSQL
public boolean supportsSQL()Deprecated.As of 1.4.5 useisSQLAvailable()Checks if the JVM supports SQL. -
hasOptimizedTreeSetAddAll
public static boolean hasOptimizedTreeSetAddAll()Checks if TreeSet.addAll is optimized for SortedSet argument.- Since:
- 1.4
-
hasOptimizedTreeMapPutAll
public static boolean hasOptimizedTreeMapPutAll()Checks if TreeMap.putAll is optimized for SortedMap argument.- Since:
- 1.4
-
canParseUTCDateFormat
public static boolean canParseUTCDateFormat() -
canParseISO8601TimeZoneInDateFormat
public static boolean canParseISO8601TimeZoneInDateFormat()- Since:
- 1.4.8
-
canCreateDerivedObjectOutputStream
public static boolean canCreateDerivedObjectOutputStream()- Since:
- 1.4.6
-
flushCache
public void flushCache()Deprecated.As of 1.4.5 no functionality- Specified by:
flushCachein interfaceCaching
-
main
-