public static class ObjectOps.ObjectHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private ObjectOps.WorkArea |
wa
The
ObjectOps.WorkArea instance. |
| Constructor and Description |
|---|
ObjectHelper(ObjectOps.WorkArea wa)
Create a new instance and associate the given WorkArea instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrement(_BaseObject_ ref)
Decrement the reference counter for this instance.
|
boolean |
delete(_BaseObject_ ref)
Deletes the given object.
|
void |
deregisterObject(_BaseObject_ ref)
Deregister the specified instance.
|
void |
increment(_BaseObject_ ref)
Increment the reference counter for this instance.
|
boolean |
inScopeFinished()
Get the state of the
ObjectOps.WorkArea.inScopeFinished flag. |
void |
instanceAssigned(_BaseObject_ ref)
Remove this instance from the pending assignments, as it was assigned.
|
boolean |
instanceReturned(_BaseObject_ ref)
Check if this reference is saved to be returned by a function or method call.
|
boolean |
isInitializing(_BaseObject_ ref)
Return true if this instance is pending initialization.
|
boolean |
isPendingAssigned(_BaseObject_ ref)
Check if the reference is marked as
ObjectOps.WorkArea.pendingAssigned. |
boolean |
isValid(_BaseObject_ ref)
Check if this object is valid.
|
void |
load(java.lang.Class<? extends _BaseObject_> cls)
Load the given legacy class.
|
void |
pendingAssign(_BaseObject_ ref)
Mark this instance as a pending assignment.
|
void |
registerObject(ObjectVar<?> obj)
Register this instance as if it was defined in the current block, so the reference can be tracked
again - this is useful for 'zero counter' reference returned from a function call, which, if not
assigned to some other var, will never get deleted.
|
void |
registerPendingScopeable()
Register the
ObjectOps.WorkArea scopeable as pending, to be added to the next block. |
void |
registerScopeable()
Register the
ObjectOps.WorkArea scopeable in this current block. |
void |
setInScopeFinished(boolean state)
Set the state of the
ObjectOps.WorkArea.inScopeFinished flag. |
private final ObjectOps.WorkArea wa
ObjectOps.WorkArea instance.public ObjectHelper(ObjectOps.WorkArea wa)
wa - The ObjectOps.WorkArea instance.public void registerPendingScopeable()
ObjectOps.WorkArea scopeable as pending, to be added to the next block.public boolean inScopeFinished()
ObjectOps.WorkArea.inScopeFinished flag.true if we are in ObjectOps.WorkArea.scopeDeleted() or
ObjectOps.WorkArea.scopeFinished().public void setInScopeFinished(boolean state)
ObjectOps.WorkArea.inScopeFinished flag.state - The flag's value.public void registerScopeable()
ObjectOps.WorkArea scopeable in this current block.public void registerObject(ObjectVar<?> obj)
obj - The object to register.public void pendingAssign(_BaseObject_ ref)
ref - The legacy instance.public void load(java.lang.Class<? extends _BaseObject_> cls)
cls - The class to initialize.public boolean delete(_BaseObject_ ref)
ref - The object to be deleted.true if the delete was possible (the instance is not on stack).public void deregisterObject(_BaseObject_ ref)
ref - The instance to deregister.public void decrement(_BaseObject_ ref)
ref - The legacy instance.public void increment(_BaseObject_ ref)
ref - The legacy instance.public boolean isPendingAssigned(_BaseObject_ ref)
ObjectOps.WorkArea.pendingAssigned.ref - The reference to check.public boolean instanceReturned(_BaseObject_ ref)
ref - The legacy instance.true if the instance is pending to be returned by a function or method call.public void instanceAssigned(_BaseObject_ ref)
ref - The legacy instance.public boolean isInitializing(_BaseObject_ ref)
ref - The legacy instance.public boolean isValid(_BaseObject_ ref)
ref - The legacy object.true if this object is valid.