Security against potential attacks
Indirect access to the embedded resource: prevented using Java encapsulation (private).
Copying of embedded resource via serialization: prevented using Java’s transient keyword.
Use of proxy class that compromises embedded resource: Ajanta class loader only loads trusted proxy classes.
Typecasting of proxy: not possible, since proxy class has no ancestors (other than the base Java class Object).
Cloning of proxy: not allowed, since proxy class does not implement Cloneable interface.