Package com.db4o.internal
Class Platform4
- java.lang.Object
-
- com.db4o.internal.Platform4
-
public final class Platform4 extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Platform4.JDKFactoryInstantiationException
-
Constructor Summary
Constructors Constructor Description Platform4()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
asUtf8(byte[] byteArray)
static boolean
callConstructor()
static boolean
canSetAccessible()
static java.lang.Object[]
collectionToArray(ObjectContainerBase stream, java.lang.Object obj)
may be needed for YapConfig processID() at a later datestatic java.lang.Object
createActiveObjectReference(java.lang.Object referenceQueue, java.lang.Object objectReference, java.lang.Object obj)
static java.lang.Object
createReferenceQueue()
static java.lang.Object
createWeakReference(java.lang.Object obj)
static java.lang.Object
deserialize(byte[] bytes)
static long
doubleToLong(double a_double)
static QConEvaluation
evaluationCreate(Transaction a_trans, java.lang.Object example)
static void
evaluationEvaluate(java.lang.Object a_evaluation, Candidate a_candidate)
static Config4Class
extendConfiguration(ReflectClass clazz, Configuration config, Config4Class classConfig)
Should create additional configuration, for example through reflection on annotations.static void
forEachCollectionElement(java.lang.Object obj, Visitor4 visitor)
static java.lang.String
format(java.util.Date date, boolean showTime)
static void
getDefaultConfiguration(Config4Impl config)
static java.lang.Object
getTypeForClass(java.lang.Object obj)
static boolean
hasWeakReferences()
static boolean
isConnected(java.net.Socket socket)
static boolean
isEnum(Reflector reflector, ReflectClass claxx)
static boolean
isJavaEnum(GenericReflector reflector, ReflectClass classReflector)
static boolean
isSimple(java.lang.Class clazz)
static boolean
isStruct(ReflectClass claxx)
Returns true if claxx represents a .net struct (a value type with members in the type handler jargon).static boolean
isTransient(ReflectClass claxx)
static JDK
jdk()
static void
link()
static void
lockFile(java.lang.String path, java.lang.Object file)
static double
longToDouble(long a_long)
static boolean
needsLockFileThread()
static Storage
newStorage()
static java.util.Date
now()
static java.lang.Class
nullableTypeFor(java.lang.Class primitiveJavaClass)
static java.lang.Object
nullValue(java.lang.Class clazz)
static void
pollReferenceQueue(java.lang.Object a_stream, java.lang.Object a_referenceQueue)
static java.lang.Class[]
primitiveTypes()
static void
printStackTrace(java.lang.Throwable t, java.io.PrintWriter out)
static Reflector
reflectorForType(java.lang.Class clazz)
static void
registerCollections(GenericReflector reflector)
static void
registerPlatformHandlers(ObjectContainerBase container)
static byte[]
serialize(java.lang.Object obj)
static void
setAccessible(java.lang.Object a_accessible)
static boolean
storeStaticFieldValues(Reflector reflector, ReflectClass claxx)
static void
throwUncheckedException(java.lang.Throwable origExc)
static byte
toSByte(byte b)
static void
unlockFile(java.lang.String path, java.lang.Object file)
static byte[]
updateClassName(byte[] bytes)
static boolean
useNativeSerialization()
static java.lang.Object
weakReferenceTarget(java.lang.Object weakRef)
static java.lang.Object
wrapEvaluation(java.lang.Object evaluation)
-
-
-
Method Detail
-
canSetAccessible
public static final boolean canSetAccessible()
-
createReferenceQueue
public static final java.lang.Object createReferenceQueue()
-
createWeakReference
public static java.lang.Object createWeakReference(java.lang.Object obj)
-
createActiveObjectReference
public static final java.lang.Object createActiveObjectReference(java.lang.Object referenceQueue, java.lang.Object objectReference, java.lang.Object obj)
-
deserialize
public static java.lang.Object deserialize(byte[] bytes)
-
doubleToLong
public static final long doubleToLong(double a_double)
-
evaluationCreate
public static final QConEvaluation evaluationCreate(Transaction a_trans, java.lang.Object example)
-
evaluationEvaluate
public static final void evaluationEvaluate(java.lang.Object a_evaluation, Candidate a_candidate)
-
collectionToArray
public static java.lang.Object[] collectionToArray(ObjectContainerBase stream, java.lang.Object obj)
may be needed for YapConfig processID() at a later date
-
extendConfiguration
public static Config4Class extendConfiguration(ReflectClass clazz, Configuration config, Config4Class classConfig)
Should create additional configuration, for example through reflection on annotations. - If a valid configuration is passed as classConfig, any additional configuration, if available, should be applied to this object, and this object should be returned. - If classConfig is null and there is no additional configuration, null should be returned. - If classConfig is null and there is additional configuration, this code should create and register a new configuration via config.objectClass(), apply additional configuration there and return this new instance. The reason for this dispatch is to avoid creation of a configuration for a class that doesn't need configuration at all.- Parameters:
clazz
- The class to be searched for additional configuration informationconfig
- The global database configurationclassConfig
- A class configuration, if one already exists- Returns:
- classConfig, if not null, a newly created ObjectClass otherwise.
-
forEachCollectionElement
public static final void forEachCollectionElement(java.lang.Object obj, Visitor4 visitor)
-
format
public static final java.lang.String format(java.util.Date date, boolean showTime)
-
getDefaultConfiguration
public static final void getDefaultConfiguration(Config4Impl config)
-
getTypeForClass
public static java.lang.Object getTypeForClass(java.lang.Object obj)
-
needsLockFileThread
public static boolean needsLockFileThread()
-
hasWeakReferences
public static final boolean hasWeakReferences()
-
isConnected
public static boolean isConnected(java.net.Socket socket)
-
isStruct
public static final boolean isStruct(ReflectClass claxx)
Returns true if claxx represents a .net struct (a value type with members in the type handler jargon).- Parameters:
claxx
-
-
jdk
public static JDK jdk()
-
isSimple
public static boolean isSimple(java.lang.Class clazz)
-
link
public static void link()
-
lockFile
public static final void lockFile(java.lang.String path, java.lang.Object file)
-
unlockFile
public static final void unlockFile(java.lang.String path, java.lang.Object file)
-
longToDouble
public static final double longToDouble(long a_long)
-
callConstructor
public static boolean callConstructor()
-
pollReferenceQueue
public static final void pollReferenceQueue(java.lang.Object a_stream, java.lang.Object a_referenceQueue)
-
registerCollections
public static void registerCollections(GenericReflector reflector)
-
serialize
public static final byte[] serialize(java.lang.Object obj) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setAccessible
public static final void setAccessible(java.lang.Object a_accessible)
-
storeStaticFieldValues
public static boolean storeStaticFieldValues(Reflector reflector, ReflectClass claxx)
-
isEnum
public static boolean isEnum(Reflector reflector, ReflectClass claxx)
-
isJavaEnum
public static boolean isJavaEnum(GenericReflector reflector, ReflectClass classReflector)
-
updateClassName
public static byte[] updateClassName(byte[] bytes)
-
weakReferenceTarget
public static java.lang.Object weakReferenceTarget(java.lang.Object weakRef)
-
wrapEvaluation
public static java.lang.Object wrapEvaluation(java.lang.Object evaluation)
-
isTransient
public static boolean isTransient(ReflectClass claxx)
- Parameters:
claxx
-
-
reflectorForType
public static Reflector reflectorForType(java.lang.Class clazz)
-
now
public static java.util.Date now()
-
useNativeSerialization
public static boolean useNativeSerialization()
-
registerPlatformHandlers
public static void registerPlatformHandlers(ObjectContainerBase container)
-
nullableTypeFor
public static java.lang.Class nullableTypeFor(java.lang.Class primitiveJavaClass)
-
nullValue
public static java.lang.Object nullValue(java.lang.Class clazz)
-
primitiveTypes
public static java.lang.Class[] primitiveTypes()
-
throwUncheckedException
public static void throwUncheckedException(java.lang.Throwable origExc)
-
toSByte
public static final byte toSByte(byte b)
-
newStorage
public static Storage newStorage()
-
asUtf8
public static java.lang.String asUtf8(byte[] byteArray)
-
printStackTrace
public static void printStackTrace(java.lang.Throwable t, java.io.PrintWriter out)
-
-