Modifier and Type | Class and Description |
---|---|
(package private) static class |
JVM.Test |
Modifier and Type | Field and Description |
---|---|
private static boolean |
canAllocateWithUnsafe |
private static boolean |
canCreateDerivedObjectOutputStream |
private static boolean |
canParseISO8601TimeZoneInDateFormat |
private static boolean |
canParseUTCDateFormat |
private static boolean |
canWriteWithUnsafe |
private static float |
DEFAULT_JAVA_VERSION |
private static boolean |
isAWTAvailable |
private static boolean |
isSQLAvailable |
private static boolean |
isSwingAvailable |
private static float |
majorJavaVersion |
private static boolean |
optimizedTreeMapPutAll |
private static boolean |
optimizedTreeSetAddAll |
private ReflectionProvider |
reflectionProvider |
private static java.lang.Class |
reflectionProviderType |
private static boolean |
reverseFieldOrder |
private static java.lang.String |
vendor |
Constructor and Description |
---|
JVM()
Deprecated.
As of 1.4.5 use the static methods of JVM.
|
Modifier and Type | Method and Description |
---|---|
ReflectionProvider |
bestReflectionProvider()
Deprecated.
As of 1.4.5 use
newReflectionProvider() |
static boolean |
canCreateDerivedObjectOutputStream() |
static boolean |
canParseISO8601TimeZoneInDateFormat() |
static boolean |
canParseUTCDateFormat() |
private static boolean |
canUseSunLimitedUnsafeReflectionProvider() |
private static boolean |
canUseSunUnsafeReflectionProvider() |
void |
flushCache()
Deprecated.
As of 1.4.5 no functionality
|
private static float |
getMajorJavaVersion()
Parses the java version system property to determine the major java version,
i.e.
|
static java.lang.Class |
getStaxInputFactory()
Get the XMLInputFactory implementation used normally by the current Java runtime as
standard.
|
static java.lang.Class |
getStaxOutputFactory()
Get the XMLOutputFactory implementation used normally by the current Java runtime as
standard.
|
static boolean |
hasOptimizedTreeMapPutAll()
Checks if TreeMap.putAll is optimized for SortedMap argument.
|
static boolean |
hasOptimizedTreeSetAddAll()
Checks if TreeSet.addAll is optimized for SortedSet argument.
|
static boolean |
is14()
Deprecated.
As of 1.4.4, minimal JDK version is 1.4 already
|
static boolean |
is15()
Deprecated.
As of 1.4.4, minimal JDK version will be 1.6 for next major release
|
static boolean |
is16()
Deprecated.
As of 1.4.4, minimal JDK version will be 1.6 for next major release
|
static boolean |
is17() |
static boolean |
is18() |
static boolean |
is19() |
private static boolean |
isAndroid() |
static boolean |
isAWTAvailable()
Checks if AWT is available.
|
private static boolean |
isIBM() |
static boolean |
isSQLAvailable()
Checks if SQL is available.
|
static boolean |
isSwingAvailable()
Checks if Swing is available.
|
java.lang.Class |
loadClass(java.lang.String name)
Deprecated.
As of 1.4.5 use
loadClassForName(String) |
java.lang.Class |
loadClass(java.lang.String name,
boolean initialize)
Deprecated.
As of 1.4.5 use
loadClassForName(String, boolean) |
static java.lang.Class |
loadClassForName(java.lang.String name)
Load a XStream class for the given name.
|
static java.lang.Class |
loadClassForName(java.lang.String name,
boolean initialize)
Load a XStream class for the given name.
|
static void |
main(java.lang.String[] args) |
static ReflectionProvider |
newReflectionProvider()
Create the best matching ReflectionProvider.
|
static ReflectionProvider |
newReflectionProvider(FieldDictionary dictionary)
Create the best matching ReflectionProvider.
|
static boolean |
reverseFieldDefinition()
Deprecated.
As of 1.4.5
|
boolean |
supportsAWT()
Deprecated.
As of 1.4.5 use
isAWTAvailable() |
boolean |
supportsSQL()
Deprecated.
As of 1.4.5 use
isSQLAvailable() |
boolean |
supportsSwing()
Deprecated.
As of 1.4.5 use
isSwingAvailable() |
private ReflectionProvider reflectionProvider
private static final boolean isAWTAvailable
private static final boolean isSwingAvailable
private static final boolean isSQLAvailable
private static final boolean canAllocateWithUnsafe
private static final boolean canWriteWithUnsafe
private static final boolean optimizedTreeSetAddAll
private static final boolean optimizedTreeMapPutAll
private static final boolean canParseUTCDateFormat
private static final boolean canParseISO8601TimeZoneInDateFormat
private static final boolean canCreateDerivedObjectOutputStream
private static final java.lang.String vendor
private static final float majorJavaVersion
private static final float DEFAULT_JAVA_VERSION
private static final boolean reverseFieldOrder
private static final java.lang.Class reflectionProviderType
private static final float getMajorJavaVersion()
public static boolean is14()
public static boolean is15()
public static boolean is16()
public static boolean is17()
public static boolean is18()
public static boolean is19()
private static boolean isIBM()
private static boolean isAndroid()
public static java.lang.Class loadClassForName(java.lang.String 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
.
public java.lang.Class loadClass(java.lang.String name)
loadClassForName(String)
public static java.lang.Class loadClassForName(java.lang.String name, boolean initialize)
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
.
public java.lang.Class loadClass(java.lang.String name, boolean initialize)
loadClassForName(String, boolean)
public static ReflectionProvider newReflectionProvider()
public static ReflectionProvider newReflectionProvider(FieldDictionary dictionary)
dictionary
- the FieldDictionary to use by the ReflectionProviderpublic static java.lang.Class getStaxInputFactory() throws java.lang.ClassNotFoundException
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.
java.lang.ClassNotFoundException
- if the standard class cannot be foundpublic static java.lang.Class getStaxOutputFactory() throws java.lang.ClassNotFoundException
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.
java.lang.ClassNotFoundException
- if the standard class cannot be foundpublic ReflectionProvider bestReflectionProvider()
newReflectionProvider()
private static boolean canUseSunUnsafeReflectionProvider()
private static boolean canUseSunLimitedUnsafeReflectionProvider()
public static boolean reverseFieldDefinition()
public static boolean isAWTAvailable()
public boolean supportsAWT()
isAWTAvailable()
public static boolean isSwingAvailable()
public boolean supportsSwing()
isSwingAvailable()
public static boolean isSQLAvailable()
public boolean supportsSQL()
isSQLAvailable()
public static boolean hasOptimizedTreeSetAddAll()
public static boolean hasOptimizedTreeMapPutAll()
public static boolean canParseUTCDateFormat()
public static boolean canParseISO8601TimeZoneInDateFormat()
public static boolean canCreateDerivedObjectOutputStream()
public void flushCache()
flushCache
in interface Caching
public static void main(java.lang.String[] args)