|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deduced.ReferenceMap
public class ReferenceMap

ReferenceMap is used to hold a map of all the references between property collections
| Field Summary | |
|---|---|
private static java.util.Map<PropertyCollection<?,?>,java.util.List<Reference>> |
REFERENCE_MAP
This map holds a weak reference to its keys and keys are compared by identity. |
| Constructor Summary | |
|---|---|
ReferenceMap()
|
|
| Method Summary | |
|---|---|
private static void |
cleanReferenceList(java.util.List<Reference> refList)
clean a list of reference to remove those that have been emptied because of the garbage collector |
private static java.util.List<Reference> |
cloneReferenceList(java.util.List<Reference> existingRefList)
clone a reference list |
static void |
deleteObject(PropertyCollection<?,?> objectToDelete)
function called when an object was deleted. |
private static void |
deleteReference(Reference currentReference)
delete a Reference between two collection by either removing the property or by setting it to null. |
static java.util.List<Reference> |
getAllReferences(PropertyCollection<?,?> referencedCollection)
Fetch all the references to a referenced collection. |
private static java.util.List<Reference> |
getReferencedList(PropertyCollection<?,?> referencedCollection)
get the list of all the reference that point to the referenced collection in the reference map. |
static boolean |
isCollectionReferenced(PropertyCollection<?,?> referencedCollection)
check if a collection is referenced or not. |
static void |
registerReference(PropertyCollection<?,?> referencedCollection,
PropertyCollection<?,?> referencer,
java.lang.Object key)
register a Reference |
static void |
removeReferenceRegistration(PropertyCollection<?,?> referencedCollection,
PropertyCollection<?,?> referencer,
java.lang.Object key)
remove a Reference registration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.Map<PropertyCollection<?,?>,java.util.List<Reference>> REFERENCE_MAP
| Constructor Detail |
|---|
public ReferenceMap()
| Method Detail |
|---|
public static void registerReference(PropertyCollection<?,?> referencedCollection,
PropertyCollection<?,?> referencer,
java.lang.Object key)
referencedCollection - the referenced collectionreferencer - the referencerkey - the key under which the reference is storedprivate static java.util.List<Reference> getReferencedList(PropertyCollection<?,?> referencedCollection)
referencedCollection - the referenced collection
public static void removeReferenceRegistration(PropertyCollection<?,?> referencedCollection,
PropertyCollection<?,?> referencer,
java.lang.Object key)
referencedCollection - the referenced collectionreferencer - the previous referencerkey - the key under which the reference is storedprivate static void cleanReferenceList(java.util.List<Reference> refList)
refList - the reference list to clean.public static boolean isCollectionReferenced(PropertyCollection<?,?> referencedCollection)
referencedCollection - the possibly referenced collection
public static java.util.List<Reference> getAllReferences(PropertyCollection<?,?> referencedCollection)
referencedCollection - the referenced collection
private static java.util.List<Reference> cloneReferenceList(java.util.List<Reference> existingRefList)
existingRefList - the list of reference to clone
public static void deleteObject(PropertyCollection<?,?> objectToDelete)
objectToDelete - the deleted objectprivate static void deleteReference(Reference currentReference)
currentReference - the reference that currently points to the object
to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||