- RedirectMethodTransformer - Class in jmplib.agent.impl
-
This transformer redirects the methods of the class to the new versions.
- RedirectMethodTransformer() - Constructor for class jmplib.agent.impl.RedirectMethodTransformer
-
- removeField(Type, Field...) - Method in interface jmplib.IIntercessor
-
Removes fields in the specified class
For example:
Intercessor.deleteField(Person.class, new jmplib.reflect.Field("lastName"));
- removeField(Type, Field...) - Method in interface jmplib.IIntercessor
-
- removeField(Type, Field...) - Method in class jmplib.SimpleIntercessor
- removeField(Type, Field...) - Method in class jmplib.TransactionalIntercessor
- removeInterface(Type, Type) - Method in interface jmplib.IIntercessor
-
Removes an interface from a class
- removeInterface(Type, Type) - Method in class jmplib.SimpleIntercessor
-
Removes an interface from a class
- removeInterface(Type, Type) - Method in class jmplib.TransactionalIntercessor
-
Removes an interface from a class
- RemoveInterfacePrimitive - Class in jmplib.primitives.impl
-
This class adds new interfaces to existing classes.
- RemoveInterfacePrimitive(ClassContent, Class<?>) - Constructor for class jmplib.primitives.impl.RemoveInterfacePrimitive
-
- removeMethod(Type, Method...) - Method in interface jmplib.IIntercessor
-
Removes a series of methods from the specified class
For example:
// Deleting method
Intercessor.deleteMethod(Dog.class, new jmplib.reflect.Method("bark"));
Dog dog = new Dog();
dog.bark(); // Throws RuntimeException
- removeMethod(Type, Method...) - Method in interface jmplib.IIntercessor
-
- removeMethod(Type, Method...) - Method in class jmplib.SimpleIntercessor
- removeMethod(Type, Method...) - Method in class jmplib.TransactionalIntercessor
- removeSuperclass(Type) - Method in interface jmplib.IIntercessor
-
Removes the superclass of an existing class, setting it to Object.
- removeSuperclass(Type) - Method in class jmplib.SimpleIntercessor
-
Removes the superclass of an existing class, setting it to Object.
- removeSuperclass(Type) - Method in class jmplib.TransactionalIntercessor
-
Removes the superclass of an existing class, setting it to Object.
- RemoveSuperClassPrimitive - Class in jmplib.primitives.impl
-
This class removes the superclass of existing classes.
- RemoveSuperClassPrimitive(ClassContent) - Constructor for class jmplib.primitives.impl.RemoveSuperClassPrimitive
-
- removeSupportMethods(CompilationUnit, TypeDeclaration) - Method in class jmplib.primitives.impl.DeleteFieldPrimitive
-
Delete the auxiliary method of the deleted field
- REPLACE_IS_INSTANCE_OPTION - Static variable in class jmplib.config.JMPlibConfig
-
- replaceField(Type, Field...) - Method in interface jmplib.IIntercessor
-
Replaces fields in the specified class
For example:
Intercessor.replaceField(Calculator.class, new jmplib.reflect.Field("lastResult", double.class));
- replaceField(Type, Field...) - Method in interface jmplib.IIntercessor
-
- replaceField(Type, Field...) - Method in class jmplib.SimpleIntercessor
- replaceField(Type, Field...) - Method in class jmplib.TransactionalIntercessor
- ReplaceFieldPrimitive - Class in jmplib.primitives.impl
-
Replaces one field
- ReplaceFieldPrimitive(ClassContent, String, Class<?>, String) - Constructor for class jmplib.primitives.impl.ReplaceFieldPrimitive
-
- replaceImplementation(Type, Method...) - Method in interface jmplib.IIntercessor
-
Replace the implementation of a series of methods of the specified class
For example, modifying the method to use a new field called lastResult:
// Modify a the method code
Intercessor.replaceImplementation(Calculator.class, new jmplib.reflect.Method("sum",
"this.lastResult = a + b;"
+ "return this.lastResult;"));
- replaceImplementation(Type, Method...) - Method in interface jmplib.IIntercessor
-
- replaceImplementation(Type, Method...) - Method in class jmplib.SimpleIntercessor
- replaceImplementation(Type, Method...) - Method in class jmplib.TransactionalIntercessor
- ReplaceImplementationPrimitive - Class in jmplib.primitives.impl
-
Replace the implementation of one method
- ReplaceImplementationPrimitive(ClassContent, String, String, Class<?>, Class<?>[]) - Constructor for class jmplib.primitives.impl.ReplaceImplementationPrimitive
-
- replaceMethod(Type, Method, Method) - Method in interface jmplib.IIntercessor
-
Replaces a method of the specified class
- replaceMethod(Type, Method, Method) - Method in interface jmplib.IIntercessor
-
- replaceMethod(Type, Map<Method, Method>) - Method in interface jmplib.IIntercessor
-
Replaces a series of methods from the specified class
For example, modifying the method to acept a more generic type (Dog ->
Animal):
// Creating MethodType
MethodType newType = MethodType.methodType(void.class, Pet.class);
// Modifying the method
Intercessor.replaceMethod(Owner.class, new jmplib.reflect.Method("addPet", newType,
"this.pet = dog;"));
- replaceMethod(Type, Method, Method) - Method in class jmplib.SimpleIntercessor
- replaceMethod(Type, Map<Method, Method>) - Method in class jmplib.SimpleIntercessor
-
Replaces a series of methods from the specified class
For example, modifying the method to acept a more generic type (Dog ->
Animal):
// Creating MethodType
MethodType newType = MethodType.methodType(void.class, Pet.class);
// Modifying the method
Intercessor.replaceMethod(Owner.class, new jmplib.reflect.Method("addPet", newType,
"this.pet = dog;"));
- replaceMethod(Type, Method, Method) - Method in class jmplib.TransactionalIntercessor
- replaceMethod(Type, Map<Method, Method>) - Method in class jmplib.TransactionalIntercessor
-
Replaces a series of methods from the specified class
For example, modifying the method to acept a more generic type (Dog ->
Animal):
// Creating MethodType
MethodType newType = MethodType.methodType(void.class, Pet.class);
// Modifying the method
Intercessor.replaceMethod(Owner.class, new jmplib.reflect.Method("addPet", newType,
"this.pet = dog;"));
- ReplaceMethodPrimitive - Class in jmplib.primitives.impl
-
Replaces one method
- ReplaceMethodPrimitive(ClassContent, String, String, Class<?>, Class<?>[], Class<?>, Class<?>[]) - Constructor for class jmplib.primitives.impl.ReplaceMethodPrimitive
-
- resetLibraryState() - Static method in class jmplib.util.intercessor.IntercessorUtils
-
This method clears the source code cache, so previously modified classes are
not taken into account when performing "unsafe" operations (those that may
produce errors with external classes that call the modified classes, such as
deleting methods or modifying the hierarchy of a class).
- resolveGenericParameters(Method, Class<?>[]) - Static method in class jmplib.util.MemberFinder
-
Resolves the generic parameter types of the method
- resolveGenericParametersToClass(Method, Class<?>[]) - Static method in class jmplib.util.MemberFinder
-
Resolves the genericity of the method to Class types
- resolveGenericReturn(Method, Class<?>[]) - Static method in class jmplib.util.MemberFinder
-
Resolves the generic return type of the method
- returnClass - Variable in class jmplib.primitives.MethodPrimitive
-
- run(String, String, Instrumentation) - Static method in class jmplib.agent.UpdaterAgent
-
The function of this method is initialize the transformers that will process
the classes to update them.