Class MarshallableArray<T>
java.lang.Object
org.infinispan.marshall.protostream.impl.MarshallableArray<T>
A wrapper for arrays of objects whose type is unknown until runtime. This is equivalent to utilising a
Object[] without the overhead of creating a MarshallableObject per
element.- Since:
- 16.0
- Author:
- Ryan Emerson
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> MarshallableArray<T> create(T[] entries) Object[]get()static <T> T[]unwrap(MarshallableArray<T> wrapper) static <T> T[]unwrap(MarshallableArray<T> wrapper, T[] dest)
-
Method Details
-
create
- Parameters:
entries- an array to be wrapped as aMarshallableArray.- Returns:
- a new
MarshallableArrayinstance containing the passed object if the array is not null, otherwise null.
-
unwrap
- Parameters:
wrapper- theMarshallableArrayinstance to unwrap- Returns:
- the wrapped array or null if the provided wrapper does not exist
-
unwrap
- Parameters:
wrapper- theMarshallableArrayinstance to unwrapdest- an array into which the array entries should be copied- Returns:
- the wrapped array or null if the provided wrapper does not exist
-
get
-