public interface ICOSContainer
This is implemented for example by COSArray.
| Modifier and Type | Method and Description |
|---|---|
ICOSContainer |
associate(ICOSContainer newContainer,
COSObject object)
It is the responsibility of the current container to create the
association with the new one.
|
COSDocumentElement |
containable(COSObject object)
The stand-in to be used when object should be contained in a container.
|
ICOSContainer |
disassociate(ICOSContainer oldContainer,
COSObject object)
It is the responsibility of the current container to remove the
association from the old one.
|
COSDocument |
getDoc()
The COSDocument instance where the ICOSContainer is contained.
|
void |
harden(COSObject object)
"Harden" the reference to
object, keeping it from being
garbage collected even if (temporarily) not accessed. |
int |
referenceCount()
The number of references to the contained object.
|
COSIndirectObject |
referenceIndirect(COSObject object)
Switch a contained object to an indirect one.
|
void |
register(COSDocumentElement object)
It is the responsibility of the active container to register object in
its data structures.
|
ICOSContainer |
restoreStateContainer(ICOSContainer container)
Restore the save state for the container.
|
ICOSContainer |
saveStateContainer()
Create a save state for the container when saving the COSObject state.
|
void |
soften(COSObject object)
"Soften" the reference to
object, making it accessible
for swapping out / garbage collection if the counter for hardening is
zero. |
void |
willChange(COSObject object)
Propagate a change from a COSObject down in the hierarchy.
|
ICOSContainer associate(ICOSContainer newContainer, COSObject object)
| composite | indirect |
|
constant | n.a. | n.a. | (always copied before by "containable")
null | ok | ok |
composite | error | ok |
indirect | ok | ok |
newContainer - object - ICOSContainer for objectCOSDocumentElement containable(COSObject object)
object - THe object whose containable is requested.ICOSContainer disassociate(ICOSContainer oldContainer, COSObject object)
| composite | indirect |
|
constant | n.a. | n.a. |
null | n.a. | n.a. |
composite | ok | n.a. |
indirect | ok | n.a. |
oldContainer - object - ICOSContainer for objectCOSDocument getDoc()
void harden(COSObject object)
object, keeping it from being
garbage collected even if (temporarily) not accessed. Otherwise a
container may decide to "swap" its descendants out of memory.
Hardening uses a counter to decide if a strong reference can be finally released.
object - The object that should be kept in memory.int referenceCount()
COSIndirectObject referenceIndirect(COSObject object)
object - The object to be indirectvoid register(COSDocumentElement object)
object - The new object to be registered in the hierarchy.ICOSContainer restoreStateContainer(ICOSContainer container)
container - ICOSContainer saveStateContainer()
void soften(COSObject object)
object, making it accessible
for swapping out / garbage collection if the counter for hardening is
zero.object - The object that should be kept in memory.void willChange(COSObject object)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.