|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.util.lang.WicketObjects
public class WicketObjects
Nested Class Summary | |
---|---|
static interface |
WicketObjects.IObjectSizeOfStrategy
Interface that enables users to plugin the way object sizes are calculated with Wicket. |
static class |
WicketObjects.SerializingObjectSizeOfStrategy
WicketObjects.IObjectSizeOfStrategy that works by serializing the object to an instance of
ByteCountingOutputStream , which records the number of bytes written to it. |
Method Summary | ||
---|---|---|
static java.lang.Object |
byteArrayToObject(byte[] data)
De-serializes an object from a byte array. |
|
static java.lang.Object |
cloneModel(java.lang.Object object)
Makes a deep clone of an object by serializing and deserializing it. |
|
static java.lang.Object |
cloneObject(java.lang.Object object)
Makes a deep clone of an object by serializing and deserializing it. |
|
static java.lang.Object |
newInstance(java.lang.String className)
Creates a new instance using the current application's class resolver. |
|
static byte[] |
objectToByteArray(java.lang.Object object)
Serializes an object into a byte array. |
|
static byte[] |
objectToByteArray(java.lang.Object object,
java.lang.String applicationName)
Serializes an object into a byte array. |
|
static
|
resolveClass(java.lang.String className)
|
|
static void |
setObjectSizeOfStrategy(WicketObjects.IObjectSizeOfStrategy objectSizeOfStrategy)
Sets the strategy for determining the sizes of objects. |
|
static void |
setObjectStreamFactory(IObjectStreamFactory objectStreamFactory)
Configure this utility class to use the provided IObjectStreamFactory instance. |
|
static long |
sizeof(java.lang.Object object)
Computes the size of an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> java.lang.Class<T> resolveClass(java.lang.String className)
T
- class typeclassName
- Class to resolve
public static java.lang.Object byteArrayToObject(byte[] data)
data
- The serialized object
public static java.lang.Object cloneModel(java.lang.Object object)
object
- The object to clone
public static java.lang.Object cloneObject(java.lang.Object object)
object
- The object to clone
cloneModel(Object)
public static java.lang.Object newInstance(java.lang.String className)
className
- The full class name
public static byte[] objectToByteArray(java.lang.Object object, java.lang.String applicationName)
object
- The objectapplicationName
- The name of application - required when serialization and deserialisation happen
outside thread in which application thread local is set
public static byte[] objectToByteArray(java.lang.Object object)
object
- The object
public static void setObjectSizeOfStrategy(WicketObjects.IObjectSizeOfStrategy objectSizeOfStrategy)
objectSizeOfStrategy
- the strategy. Pass null to reset to the default.public static void setObjectStreamFactory(IObjectStreamFactory objectStreamFactory)
IObjectStreamFactory
instance.
objectStreamFactory
- The factory instance to use. If you pass in null, the
default
will be set (again). Pass null to reset
to the default.public static long sizeof(java.lang.Object object)
object
- Object to compute size of
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |