I’ve read some articles of aspectj, I know it can enhance classes, which is attractive. I’ve a very stupid question that I can’t find a clear answer:
Can aspectj add methods to java.lang.String?
Or similar question: If I can’t get the sources of some classes, can I enhance them by aspectj?
No, you can’t do this my friend.
I think this is what you are looking for Type not exposed to user
For further details please take a look at The AspectJ Development Environment Guide #Special Cases
As it says