Java tutorial
//package com.java2s; public class Main { static <T> void validateServiceClass(Class<T> paramClass) { if (!paramClass.isInterface()) throw new IllegalArgumentException("Only interface endpoint definitions are supported."); if (paramClass.getInterfaces().length > 0) throw new IllegalArgumentException("Interface definitions must not extend other interfaces."); } }