|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.core.ObjectRepository
This class allows the JAC applications to access objects that are managed within the current VM or that can be defined outside of it by the currently woven aspects.
By default, the object repository methods only return the JAC
objects that are accessible through the
JacObject.getObject
methods. However, since it upcalls
the ACManager.whenGetObjects()
method, all the aspect
components can change the returned object set.
As typical examples:
ACManager.whenGetObjects(Collection,ClassItem)
,
AspectComponent.whenGetObjects(Collection,ClassItem)
Constructor Summary | |
ObjectRepository()
|
Method Summary | |
static void |
delete(Wrappee object)
This method deletes the given JAC object by removing it from the different collections it has been inserted into by the system. |
void |
dump()
|
static void |
free(Wrappee object)
|
static Object |
getMemoryObject(int nth)
This method returns the nth object that has been created in the Jac system. |
static int |
getMemoryObjectIndex(Object obj)
This method returns the index of anobject that has been created in the Jac system. |
static Collection |
getMemoryObjects()
This method returns all the JAC objects that are in the current JVM memory (use getObjects() to get all the objects
handled by the woven aspects -- such as distribution or
persistence). |
static Object[] |
getMemoryObjects(ClassItem cl)
This method returns all the JAC objects of a given type as an array. |
static Object[] |
getMemoryObjects(ClassItem[] types)
This method returns all the Jac objects that match any of the given types. |
static Object[] |
getMemoryObjects(String type)
This method returns all the Jac objects of a given type as an array. |
static Object[] |
getMemoryObjects(String[] types)
This method returns all the JAC objects that match any of the given types. |
static Collection |
getObjects()
Gets all the instantiated JAC objects on the current VM and on all the external objects sources known by the aspects (maybe resticed by some aspects). |
static Collection |
getObjects(Class cl)
Gets all the JAC objects instances of a given class on the current VM and on all the external objects sources known by the aspects (maybe resticed by some aspects). |
static Collection |
getObjects(ClassItem cl)
Gets all the JAC objects instances of a given class on the current VM and on all the external objects sources known by the aspects (maybe resticed by some aspects). |
static Collection |
getObjectsWhere(ClassItem cl,
FieldItem relation,
Object value)
Get all instances of a class whose field relation contains the given value. |
static Collection |
getObjectsWhere(ClassItem cl,
Predicate filter)
Get all instances of class cl which match a predicate |
static int |
memoryObjectCount()
This method returns the object counter of the Jac system (last created object is getObject(objectCount()-1) ). |
static void |
register(Object wrappee)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ObjectRepository()
Method Detail |
public static void register(Object wrappee)
public static void delete(Wrappee object)
The JAVA GC, will then be able to free it from memory on its next run.
public static void free(Wrappee object)
public static Object getMemoryObject(int nth)
nth
- the object index
public static int getMemoryObjectIndex(Object obj)
obj
- the object
public static int memoryObjectCount()
getObject(objectCount()-1)
).
public static Collection getMemoryObjects()
getObjects()
to get all the objects
handled by the woven aspects -- such as distribution or
persistence).
getObjects()
,
getObjects(ClassItem)
,
getMemoryObjects(ClassItem)
public static Object[] getMemoryObjects(String type)
type
- the type to get
getObjects()
,
getObjects(ClassItem)
,
getMemoryObjects(ClassItem)
public static Object[] getMemoryObjects(ClassItem cl)
cl
- the type to get
getObjects()
,
getObjects(ClassItem)
,
getMemoryObjects()
public static Object[] getMemoryObjects(String[] types)
types
- the types to get
public static Object[] getMemoryObjects(ClassItem[] types)
types
- the types to get
public static Collection getObjects()
getObjects(ClassItem)
,
getMemoryObjects()
public static Collection getObjects(ClassItem cl)
cl
getObjects(Class)
public static Collection getObjects(Class cl)
cl
getObjects(ClassItem)
public static Collection getObjectsWhere(ClassItem cl, FieldItem relation, Object value)
cl
- the classrelation
- the relationvalue
- the value that the relation must containRttiConf.defineRepository(ClassItem,String,CollectionItem)
public static Collection getObjectsWhere(ClassItem cl, Predicate filter)
cl
- the classfilter
- the predicate to be matched
public void dump()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |