- Introduction to Javassist
- Write .class file of a class to a file
- Add super class to a class
- Get the modified byte code
- Define new class at run time
- Add fields to new class
- Add non-primitive fields to a class
- Add field of type list to a class
- Add static field to a class
- Remove a field from class
- Add methods to the new class
- Modify type of instance field
- Add new method and invoke it for an existing class
- Create new interface at run time
- Dealing with Frozen classes
- Pruning: Discard unnecessary information
- Get CtClass object from byte array
- Get CtClass object from .class file
- Get CtClass object from InputStream
- Remove CtClass object from ClassPool
- Add new fields to existing class
- Add methods to existing class
- Remove a method from an existing class
- Add an annotation to a run time generated class
- Add an annotation to a run time generated method
- Replace content of a method at run time
- Create proxy to a class
- check whether object is proxy?
- Add dynamically generated classes to a package
- Create new instance from CtClass
- Create copy of a class
- Create new instance from CtClass
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Tuesday 21 April 2020
Javassist tutorial
Labels:
Javassist
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment