public void testParentInterfaces() throws Exception { String[] extraClasses = new String[] { SupportedValuesAttribute.class.getName()}; MockServiceReference ref = new MockServiceReference(addExtraIntfs(extraClasses)); Class<?>[] clazzes = proxyCreator.discoverProxyClasses(ref); assertEquals(2, clazzes.length); assertTrue(containsClass(clazzes, Comparable.class)); assertTrue(containsClass(clazzes, SupportedValuesAttribute.class)); }
public void testParentInterfaces() throws Exception { String[] extraClasses = new String[] { SupportedValuesAttribute.class.getName(), LabeledEnum.class.getName() }; MockServiceReference ref = new MockServiceReference(addExtraIntfs(extraClasses)); Class[] clazzes = proxyCreator.discoverProxyClasses(ref); assertEquals(2, clazzes.length); assertTrue(containsClass(clazzes, LabeledEnum.class)); assertFalse(containsClass(clazzes, Comparable.class)); assertTrue(containsClass(clazzes, SupportedValuesAttribute.class)); }
/** * Returns the name of the supported attribute * based on the given standard attribute category. * * @param clazz the standard attribute category * @return The name of the supported attribute category. */ public static String getSupportedAttrName(Class clazz) { return ((SupportedValuesAttribute) instanceByClass.get(clazz)).getName(); }
/** * Returns the category of the supported attribute * based on the given standard attribute category. * * @param clazz the standard attribute category * @return The supported attribute category. */ public static Class getSupportedCategory(Class clazz) { return ((SupportedValuesAttribute) instanceByClass.get(clazz)).getCategory(); }