|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.kaariboga.core.ClassManager
Stores the classes and the bytecodes of the loaded classes. It is responsible to remove the classes if there is no longer any kaariboga of that kind active.
Inner Class Summary | |
(package private) class |
ClassManager.ClassBox
Helper class for the ClassManager to wrap class and bytecodes of the loaded classes. |
(package private) class |
ClassManager.Remover
Helper class for the ClassManager that removes a class after a given delay time. |
Field Summary | |
java.io.File[] |
agentsPath
The path where the agents class files are. |
(package private) java.util.Hashtable |
cache
Stores class data in ClassBoxes. |
(package private) long |
delay
|
Constructor Summary | |
ClassManager(long delay,
java.lang.String[] path)
Create a new ClassManager. |
Method Summary | |
void |
addClass(java.lang.String name,
java.lang.Class cl,
byte[] byteCode)
Adds a new class to the class manager. |
void |
dec(java.lang.String name)
Decreases the count of class name |
byte[] |
getByteCode(java.lang.String name)
Returns the byte code of a class |
java.lang.Class |
getClass(java.lang.String name)
Returns the class of a given name |
void |
inc(java.lang.String name)
Increases the count of class name |
void |
removeClass(java.lang.String name)
Removes a class and it's bytecode from the class manager |
Methods inherited from class java.lang.Object |
|
Field Detail |
public java.io.File[] agentsPath
java.util.Hashtable cache
long delay
Constructor Detail |
public ClassManager(long delay, java.lang.String[] path)
delay
- Time in milliseconds the ClassManager waits before a
class is removed after it's count = 0.path
- The classpath from which classes are sent to other
bases.Method Detail |
public void addClass(java.lang.String name, java.lang.Class cl, byte[] byteCode)
name
- Name of the class.cl
- The class istself.byteCode
- Byte code of the class.public void removeClass(java.lang.String name)
name
- Name of the class to be removedpublic java.lang.Class getClass(java.lang.String name)
public byte[] getByteCode(java.lang.String name)
public void inc(java.lang.String name)
public void dec(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |