Package de.sandec.jmemorybuddy
Interface JMemoryBuddy.MemoryTestAPI
-
- Enclosing class:
- JMemoryBuddy
public static interface JMemoryBuddy.MemoryTestAPIThis class provides different methods, which can be used to declare memory-constraints. You can get an instance through the lambda of the method JMemoryBuddy.memoryTest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassertCollectable(java.lang.Object ref)After executing the lambda, the provided ref must be collectable.voidassertNotCollectable(java.lang.Object ref)After executing the lambda, the provided ref must be not collectable.voidsetAsReferenced(java.lang.Object ref)The provided reference will be reference hard, so it won't be collected, until memoryTest finishes.
-
-
-
Method Detail
-
assertCollectable
void assertCollectable(java.lang.Object ref)
After executing the lambda, the provided ref must be collectable. Otherwise an Exception is thrown.- Parameters:
ref- The reference which should be collectable.
-
assertNotCollectable
void assertNotCollectable(java.lang.Object ref)
After executing the lambda, the provided ref must be not collectable. Otherwise an Exception is thrown.- Parameters:
ref- The reference which should not be collectable.
-
setAsReferenced
void setAsReferenced(java.lang.Object ref)
The provided reference will be reference hard, so it won't be collected, until memoryTest finishes.- Parameters:
ref- The reference which should get a hard reference for this test.
-
-