Package org.qbicc.interpreter.memory
Class MemoryFactory
java.lang.Object
org.qbicc.interpreter.memory.MemoryFactory
Factory methods for producing memory instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Memorystatic MemorygetEmpty()Get an empty memory.static Memorystatic BooleanArrayMemorywrap(boolean[] array) Wrap the given array as a memory of the same size and type.static ByteArrayMemoryWrap the given array as a memory of the same size and type.static CharArrayMemorywrap(char[] array) Wrap the given array as a memory of the same size and type.static DoubleArrayMemorywrap(double[] array) Wrap the given array as a memory of the same size and type.static FloatArrayMemorywrap(float[] array) Wrap the given array as a memory of the same size and type.static IntArrayMemorywrap(int[] array) Wrap the given array as a memory of the same size and type.static LongArrayMemorywrap(long[] array) Wrap the given array as a memory of the same size and type.static ShortArrayMemorywrap(short[] array) Wrap the given array as a memory of the same size and type.static ReferenceArrayMemorywrap(VmObject[] array, ReferenceType refType) Wrap the given array as a memory of the same size and type.
-
Method Details
-
getEmpty
Get an empty memory. The memory may have any type (or none) and is not guaranteed to be extendable or copyable.- Returns:
- an empty memory (not
null)
-
replicate
-
compose
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type.- Parameters:
array- the array to wrap (must not benull)- Returns:
- the wrapper memory (must not be
null)
-
wrap
Wrap the given array as a memory of the same size and type. The size of a reference is acquired from the given type.- Parameters:
array- the array to wrap (must not benull)refType- the reference type (must not benull)- Returns:
- the wrapper memory (must not be
null)
-