protected void maybeWarnAboutAnonymousValue(T t) {
		if (!WARN_ON_ANONYMOUS_VALUE) {
			return;
		}

		// Note: sadly, this code does not work with labmda's, as we cannot get the enclosing
		//       method/constructor

		Class<? extends Object> clazz = t.getClass();
		if (!clazz.isAnonymousClass()) {
			return; // O.K.
		}

		Method enclosingMethod = clazz.getEnclosingMethod();
		if (enclosingMethod != null) {
			Msg.debug(this, "added an anonymous class created in a method: " + clazz.getName(),
				new Throwable());
			return;
		}

		Constructor<?> enclosingConstructor = clazz.getEnclosingConstructor();
		if (enclosingConstructor != null) {
			Msg.debug(this, WARNING_MESSAGE + "\nClass name: " + clazz.getName(), new Throwable());
		}
	}
Looks for situations where clients <b>may</b> lose the values added to this class.  This
most often happens when a client adds an anonymous, local listener to an object that is
using a WeakSet to store its listeners.  Our policy is to implement listeners at the
class field level so that they will not be flagged by this method.

@param t The object to check
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/WeakSet.java