| java.lang.Object ch.ethz.inf.iks.jvmai.jvmdi.HotSwapClassRegister
HotSwapClassRegister | public class HotSwapClassRegister (Code) | | Analyses classes and holds a register all found field
accesses, field modifications, method calls, exception
throws and exception catches.
author: Angela Nicoara author: Gerald Linhofer version: $Revision: 1.1.2.2 $ |
Inner Class :class RegisterMethodVisitorImpl extends EmptyVisitor | |
Method Summary | |
public void | classLoaded(Class cls) Notification that the class cls will be loaded. | public static HotSwapClassRegister | getInstance() Returns the instance of this class (this is a
'singelton', so there's only one instance). | public void | registrationRequest(Class cls) Registers a class, which may hold a field, method call or
exception join point. | public void | registrationRequest(Package pkg) Registers a package, which may contain classes that may
hold a field, method call or exception join point. | public void | registrationRequestAll() Scans all loaded classes for potential field, method call and exception
join points. | public void | registrationRequestSubClasses(Class cls) Scans all loaded subclasses of cls for
potential join points. | public void | removeRequest(Class cls) Just for convinience, this method does nothing. | public void | removeRequest(Package pkg) Stops scanning and registration of new loaded classes
belonging to Package pkg . | public void | removeRequestAll() Stops scanning and registration of all new loaded classes. | public void | removeRequestSubClass(Class cls) Stops scanning and registration of new loaded sub classes
of cls . | public void | reset() | protected void | scan(Class cls) Scans the target method for field accesses, field modifications,
catched exceptions, method calls and method returns, and registers
all found actions to the according map. | public void | scanClasses(List cls) Scans the method byte codes of a Collection of classes. | protected void | scanConstantPool(Class cls) Scans the constant pool of class cls for method and field
references. | protected static void | setAspectInterface(HotSwapAspectInterfaceImpl aspectInterface, String[] packagePrefixes, boolean openWorldAssumption) Registers the JVMAspectInterface (must be called before the first
call to
HotSwapClassRegister.scan scan(java.lang.Class) . |
knownFieldAccesses | public static Map knownFieldAccesses(Code) | | Maps fields to all methods known to access them.
Identifier for the fields are the keys, the value
is a Collection, holding identifiers for the method.
The field identifier has the form Classname#FieldName#JNISignature
and the method identifier Classname#MethodName#JNISignature#isStatic .
|
knownFieldModifiers | public static Map knownFieldModifiers(Code) | | Maps fields to all methods known to modifie them.
Identifier for the fields are the keys, the value
is a Collection, holding identifiers for the method.
The field identifier has the form Classname#FieldName#JNISignature
and the method identifier Classname#MethodName#JNISignature#isStatic .
|
knownFieldReferences | public static Map knownFieldReferences(Code) | | Maps field names to collection of classes, which holds references to them.
This Map stores results from scanConstantPool .
The field name is in the form Classname#FieldName#JNISignature .
|
classLoaded | public void classLoaded(Class cls)(Code) | | Notification that the class cls will be loaded.
Scanns the cls if required, and triggers weaving of the class
if it contains any join point.
Parameters: cls - the class that has been prepared |
getInstance | public static HotSwapClassRegister getInstance()(Code) | | Returns the instance of this class (this is a
'singelton', so there's only one instance).
HotSwapClassRegister instance. |
registrationRequest | public void registrationRequest(Class cls) throws ClassNotFoundException(Code) | | Registers a class, which may hold a field, method call or
exception join point. This class will be scanned immediatly
and all potential join points will be registered.
Parameters: cls - class that may contain join points. throws: java.io.IOException - can not read the class file. |
registrationRequest | public void registrationRequest(Package pkg)(Code) | | Registers a package, which may contain classes that may
hold a field, method call or exception join point. This classes
will be scanned and all potential join points will be registrated.
New loaded classes will alse be scaned until
HotSwapClassRegister.removeRequestAll removeRequestAll() is called.
Parameters: pkg - |
registrationRequestAll | public void registrationRequestAll()(Code) | | Scans all loaded classes for potential field, method call and exception
join points.
New loaded classes will alse be scaned until
HotSwapClassRegister.removeRequestAll removeRequestAll() is called.
|
registrationRequestSubClasses | public void registrationRequestSubClasses(Class cls)(Code) | | Scans all loaded subclasses of cls for
potential join points.
New loaded classes will also be scanned.
Parameters: cls - |
removeRequest | public void removeRequest(Class cls)(Code) | | Just for convinience, this method does nothing.
Parameters: cls - |
removeRequestAll | public void removeRequestAll()(Code) | | Stops scanning and registration of all new loaded classes.
|
reset | public void reset()(Code) | | Clears all registrations and registration requests
|
scan | protected void scan(Class cls) throws ClassNotFoundException(Code) | | Scans the target method for field accesses, field modifications,
catched exceptions, method calls and method returns, and registers
all found actions to the according map.
Parameters: cls - throws: java.io.IOException - can not read the class file |
scanClasses | public void scanClasses(List cls)(Code) | | Scans the method byte codes of a Collection of classes. Already scanned classes
will be ignored.
Parameters: cls - Collection holding java.lang.Class Class objects, for the classesthat will be scanned. |
scanConstantPool | protected void scanConstantPool(Class cls) throws ClassNotFoundException(Code) | | Scans the constant pool of class cls for method and field
references.
Parameters: cls - the class that's constant pool should get scanned. throws: ClassNotFoundException - can not find the file defining the class. |
setAspectInterface | protected static void setAspectInterface(HotSwapAspectInterfaceImpl aspectInterface, String[] packagePrefixes, boolean openWorldAssumption)(Code) | | Registers the JVMAspectInterface (must be called before the first
call to
HotSwapClassRegister.scan scan(java.lang.Class) .
Parameters: aspectInterface - Parameters: packagePrefixes - Parameters: openWorldAssumption - |
|
|