Here you can find the source of getImplementedInterfaces(Class clazz)
clazz
.
Parameter | Description |
---|---|
clazz | a parameter |
private static List<String> getImplementedInterfaces(Class clazz)
//package com.java2s; /**//ww w . ja v a 2 s . co m * Copyright (c) 2013 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Obeo - initial API and implementation * */ import java.util.ArrayList; import java.util.List; public class Main { /** * Returns the list of interfaces implemented by the class * <code>clazz</code>. * * @param clazz * @return */ private static List<String> getImplementedInterfaces(Class clazz) { List<String> list = new ArrayList(); Class[] classes = clazz.getInterfaces(); for (Class c : classes) { list.add(c.getCanonicalName()); list.addAll(getImplementedInterfaces(c)); } return list; } }