Serialization of Method object in Java is possible?
java, reflection, serialization
Solution
There is no way to serialize a method object in a portable way since it doesn't contain all the necessary information to restore it (for example, the bytecode).
Instead, you should serialize the name of the class, the method name and the parameter types. Then you can recreate the `Method` instance during deserialization.
Problem
I'm getting this error when I try to serialize a Method object. ``` java.io.NotSerializableException: java.lang.reflect.Method ``` Any Idea?