Does it implement Serializable interface
import java.io.Serializable;
public class Main {
public static boolean isSerializable(final Class c) {
return (Serializable.class.isAssignableFrom(c));
}
}
Home
Java Book
Runnable examples
Java Book
Runnable examples
Reflection interface:
- Get implemented interfaces
- Get Super Interfaces
- Is it an interface
- Does it implement Serializable interface
- Interfaces for a primitive type is an empty array
- Superclass of interfaces is always null