Package org.eclipse.mat.inspections

# Class CommonNameResolver.DoubleAdderResolver

java.lang.Object
org.eclipse.mat.inspections.CommonNameResolver.DoubleAdderResolver

All Implemented Interfaces:
  `IClassSpecificNameResolver`

Enclosing class:
  `CommonNameResolver`

public static class CommonNameResolver.DoubleAdderResolver extends Object implements IClassSpecificNameResolver
Resolves the current sum of a `DoubleAdder` from its internal `Striped64` representation.

`Striped64` stores double values as raw IEEE 754 bit patterns in `long` fields (`base` and each `Cell.value`) so that the JVM's integer-width compare-and-swap instruction can be used — there is no native atomic CAS on `double`. Each field must therefore be decoded with `Double.longBitsToDouble(long)` before accumulation; summing the raw long representations directly would produce nonsense. The initial value of `base` in a freshly constructed `DoubleAdder` is `0L`, which correctly decodes to `0.0`.

## Constructor Summary

Constructors
Constructor
Description
`DoubleAdderResolver()`

## Method Summary

Modifier and Type
Method
Description
`String`
`resolve(IObject obj)`
Resolve the name for snapshot object.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DoubleAdderResolver

public DoubleAdderResolver()

## Method Details

### resolve

public String resolve(IObject obj) throws SnapshotException
Description copied from interface: `IClassSpecificNameResolver`
Resolve the name for snapshot object.

Specified by:
  `resolve` in interface `IClassSpecificNameResolver`
Parameters:
  `obj` - object for which the name should be resolved
Returns:
  name for snapshot object
Throws:
  `SnapshotException` - problem retrieving the name