Android examples for java.lang.reflect:interface
is class implementing Serializable
import java.io.Serializable; import java.lang.reflect.Field; import android.os.Bundle; import android.os.Parcelable; public class Main{ //w w w .j ava 2s . c om private static boolean isImplementSerializable(Class clazz) { Class[] interfaces = clazz.getInterfaces(); if (interfaces.length == 0) { return false; } for (Class i : interfaces) { if (i == Serializable.class) { return true; } } return false; } }