shueja / Monologue

21 stars 7 forks source link

Add support for logging suppliers in Logged classes #19

Closed shueja closed 6 months ago

shueja commented 8 months ago

This adds the supplier as equivalent to

@Log
public <type> key() {
   return supplier.getAs<Type>();
}

but with no reflection necessary.

oh-yes-0-fps commented 8 months ago

Is there any reason Struct Suppliers aren't supported, is it an issue with java generics?

shueja commented 6 months ago

Closing this PR, half-baked effort made outdated by major refactors. Also this feature needs to get the value of the supplier every loop, instead of just logging it directly.