|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.futureshocked.classloader.ClassTransforms
public class ClassTransforms
A contain for InterceptedMethod
, which also has boolean
methods that will let DebuggerClassLoader
know if a class should
be modified, and DebuggerClassVisitor
know if a method should be
modified.
Field Summary | |
---|---|
private java.util.HashMap |
classes
A HashMap that contains String keys, consisting of class names, that map to List objects that hold InterceptedMethod . |
Constructor Summary | |
---|---|
ClassTransforms()
Constructor that simply creates a new HashMap for this.classes. |
Method Summary | |
---|---|
InterceptedMethod |
addCodeStyleInterceptedMethod(java.lang.String code)
Add a new method to be intercepted. |
void |
addInterceptedMethod(InterceptedMethod im)
Adds an already created InterceptedMethod object to this container. |
InterceptedMethod |
addInterceptedMethod(java.lang.String className,
java.lang.String method,
java.lang.String desc)
Add a new method to be intercepted. |
InterceptedMethod |
getInterceptedMethod(java.lang.String className,
java.lang.String method,
java.lang.String desc)
Returns an InterceptedMethod that matches className,
method, and desc. |
java.util.List |
getMethodsByClass(java.lang.String className)
Returns all InterceptedMethod objects that belong to
className. |
boolean |
modifyClass(java.lang.String className)
Checks classes for a key equal to className. |
boolean |
modifyMethod(java.lang.String className,
java.lang.String method,
java.lang.String desc)
Checks to see if a method needs to be modified. |
void |
removeInterceptedMethod(InterceptedMethod im)
Removes an InterceptedMethod from this container.This method matches using reference equality (==), rather than the InterceptedMethod.matches() method, so to remove an object the exact object should first be obtained from this container, rather than creating a new InterceptedMethod with the same values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.HashMap classes
InterceptedMethod
.
Constructor Detail |
---|
public ClassTransforms()
Method Detail |
---|
public boolean modifyClass(java.lang.String className)
className
- The name of the class about to be loaded.
public boolean modifyMethod(java.lang.String className, java.lang.String method, java.lang.String desc)
className
- The name of the class the method belongs to.method
- The method being checked.desc
- The description of the method.
public InterceptedMethod getInterceptedMethod(java.lang.String className, java.lang.String method, java.lang.String desc)
InterceptedMethod
that matches className,
method, and desc. See InterceptedMethod
for
information related to matching.
className
- The name of the class the method belongs to.method
- The name of the method.desc
- The description of the method - see
ApplicationDebugger
for information about the format.
InterceptedMethod
is not found, the
correct object if it's found.public java.util.List getMethodsByClass(java.lang.String className)
InterceptedMethod
objects that belong to
className.
className
- The name of the class being queried.
InterceptedMethod
objects if any methods are to be
intercepted.public InterceptedMethod addCodeStyleInterceptedMethod(java.lang.String code)
code
- A code style method description.
InterceptedMethod
that will match the user specified
method.public InterceptedMethod addInterceptedMethod(java.lang.String className, java.lang.String method, java.lang.String desc)
className
- The name of the class the method belongs to.method
- The name of the method to be intercepted.desc
- The description of the method, see ApplicationDebugger
for an example of the format, or the ASM documentation.
InterceptedMethod
that will match the user specified
method.public void addInterceptedMethod(InterceptedMethod im)
InterceptedMethod
object to this container.
im
- InterceptedMethod
objectpublic void removeInterceptedMethod(InterceptedMethod im)
InterceptedMethod
from this container.InterceptedMethod
with the same values.
im
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |