getJoltAttachments static method

  1. @visibleForTesting
Set<Disposer> getJoltAttachments(
  1. Object target
)

Gets all disposers attached to the given object.

Parameters:

  • target: The object to get disposers for

Returns: A set of all disposers attached to the object, or an empty set if none

This method is primarily intended for testing purposes.

Example:

final disposers = JFinalizer.getJoltAttachments(signal);
expect(disposers.length, equals(1));

Implementation

@visibleForTesting
static Set<Disposer> getJoltAttachments(Object target) =>
    joltAttachments[target] ?? {};