41424344454647
*/ @Validate public SingleInitGuard(@NotNull final Class<?> owner) { this.className = owner.getSimpleName(); this.flag = new SharedFlag(); }
53545556575859
*/ @Validate public SingleInitGuard(@NotNull final String className) { this.className = className; this.flag = new SharedFlag(); }
40414243444546
*/ @Validate public MultiInitGuard(@NotNull final Class<?> owner) { this.className = owner.getSimpleName(); this.flag = new SharedFlag(); }
52535455565758
*/ @Validate public MultiInitGuard(@NotNull final String className) { this.className = className; this.flag = new SharedFlag(); }
* Default constructor, if using this then the object must be set explicitly before getting. */ public Frozen() { // set flag to false flag = new SharedFlag(); }
4950515253545556
* Initialises with an object, preventing subsequent overwriting. */ public Frozen(T object) { // set flag to true flag = new SharedFlag(true); this.object = object; }