It is not to allow one thread at a time, but only one specific thread.
It is not a class I have access to (well I actually would like to avoid creating a fork), or I could use this, despite I think what jRat probably does could be used to make such approach automatic concerning classes we dont want to fork.
So, there is the main() thread where everything starts, I want to prevent all methods and field of all objects of an specific class to be modified by any other threads, by throwing exception/crash if that happens. Such objects must remain unmodified (it's field values) while the main thread works with it.
How would you do that? if it is really possible at all.