|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Minimal set of methods for instrumenting classes.
A Class implementing instrumentor is seen as a "black-box" which makes passed in classes versionable and hands out the bytecode needed.
The general idea is to be independent of the underlying implementation.
Nested Class Summary | |
static class |
Instrumentor.SmartReplacements
|
Field Summary | |
static java.lang.String |
CLEANMETHOD
Method to clean flags. |
static java.lang.String |
CREATEDMETHOD
To verify if object has newly created. |
static java.lang.String |
CREATEMETHOD
Mark object as freshly created. |
static java.lang.String |
DELETEDMETHOD
To verify if object is marked for deletion. |
static java.lang.String |
DELETEMETHOD
Mark object for deletion. |
static java.lang.String |
DIRTYMETHOD
To verify is object has been altered. |
static java.lang.String |
SMARTCOLLECTION
A replacement for java.util.Collection. |
static java.util.Properties |
SMARTCONTAINERS
A map containing container classes and their smart replacements. |
static java.lang.String |
SMARTLIST
A replacement for java.util.List. |
static java.lang.String |
SMARTMAP
A replacement for java.util.Map. |
static java.lang.String |
SMARTSET
A replacement for java.util.Set. |
static java.lang.String |
VERSIONCLASS
Default implementation for VERSIONINTERFACE. |
static java.lang.String |
VERSIONFIELD
Name of the field in versionable classes. |
static java.lang.String |
VERSIONHELPER
The helper class used by instrumentors + TOs (on runtime) |
static java.lang.String |
VERSIONINTERFACE
Interface to be used for versionable objects. |
static java.lang.String |
VERSIONMETHOD
Method to call upon field write access. |
Method Summary | |
java.lang.Class |
defineClass()
Use internal classloader to build class object. |
byte[] |
getBytecode()
Get modified class as byte array. |
void |
modifyClass(java.lang.String name)
Modifies this class. |
void |
modifyClass(java.lang.String basedir,
java.lang.String file)
|
Field Detail |
public static final java.lang.String VERSIONINTERFACE
public static final java.lang.String VERSIONCLASS
public static final java.lang.String VERSIONHELPER
public static final java.lang.String VERSIONFIELD
public static final java.lang.String VERSIONMETHOD
public static final java.lang.String DIRTYMETHOD
public static final java.lang.String CLEANMETHOD
public static final java.lang.String DELETEDMETHOD
public static final java.lang.String CREATEDMETHOD
public static final java.lang.String DELETEMETHOD
public static final java.lang.String CREATEMETHOD
public static final java.lang.String SMARTCOLLECTION
public static final java.lang.String SMARTMAP
public static final java.lang.String SMARTLIST
public static final java.lang.String SMARTSET
public static final java.util.Properties SMARTCONTAINERS
Method Detail |
public void modifyClass(java.lang.String name) throws InstrumentorException
name
- class to modify, package notation or filename.
InstrumentorException
- in case of errorspublic void modifyClass(java.lang.String basedir, java.lang.String file) throws InstrumentorException
InstrumentorException
public byte[] getBytecode() throws InstrumentorException
InstrumentorException
public java.lang.Class defineClass()
Exists rather for testing purposes, as classes won't be compatible !
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |