|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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(List,ClassItem)
,
AspectComponent#whenGetObjects(List,ClassItem)
Constructor Summary | |
ObjectRepository()
|
Method Summary | |
static void |
delete(Wrappee wrappee)
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 wrappee)
|
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 |
getObjects(String expr)
Gets the set of JAC objects whose names match an expression. |
static Collection |
getObjectsWhere(ClassItem cl,
FieldItem relation,
Object value)
Get all instances of class cl whose field relation contains the given value. |
static Collection |
getObjectsWhere(ClassItem cl,
Predicate filter)
Get all instances of class cl whose field relation contains the given value. |
static int |
memoryObjectCount()
This method returns the object counter of the Jac system (last created object is getObject(objectCount()-1) ). |
static void |
register(Wrappee 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(Wrappee wrappee)
public static void delete(Wrappee wrappee)
The JAVA GC, will then be able to free it from memory on its next run.
public static void free(Wrappee wrappee)
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).
public static Object[] getMemoryObjects(String type)
type
- the type to get
public static Object[] getMemoryObjects(ClassItem cl)
cl
- the type to get
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 containpublic static Collection getObjectsWhere(ClassItem cl, Predicate filter)
cl
- the classpublic static Collection getObjects(String expr)
expr
- a regular expression
public void dump()
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |