|
jPod PDF library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICOSContainer
A low level interface for polymorphic access to an object containing a COSObject.
This is implemented for example by COSArray
.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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 object
COSDocumentElement 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 object
COSDocument 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)
|
jPod PDF library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |