Package org.github.jamm
Interface Measurable
public interface Measurable
Interface that allows users to avoid crawling via reflection by adding children manually to the stack, therefore
speeding up the computation. The downside of this approach is that it pushes the responsibility to the user to ensure
that all the children are provided.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildrenTo(MeasurementStack stack) Adds the children that should be part of the measurement to the stackdefault longshallowSize(MemoryMeterStrategy strategy) Allow the implementation to pre-compute and cache theMeasurableshallow size.
-
Method Details
-
shallowSize
Allow the implementation to pre-compute and cache theMeasurableshallow size.- Parameters:
strategy- theMemoryMeterStrategy- Returns:
- the object shallow size
-
addChildrenTo
Adds the children that should be part of the measurement to the stack- Parameters:
stack- the stack to which the children must be added
-