public void customResultAvailable(Class<?> result) { // todo: cache results Set<Class<?>> res = new LinkedHashSet<Class<?>>(); res.add(result); Class<?>[] sins = SReflect.getSuperInterfaces(new Class[]{result}); for(Class<?> sin: sins) { if(sin.isAnnotationPresent(Service.class)) { res.add(sin); } } ret.setResult(res); } });
public void customResultAvailable(Class<?> result) { // todo: cache results Set<Class<?>> res = new LinkedHashSet<Class<?>>(); res.add(result); Class<?>[] sins = SReflect.getSuperInterfaces(new Class[]{result}); for(Class<?> sin: sins) { if(sin.isAnnotationPresent(Service.class)) { res.add(sin); } } ret.setResult(res); } });
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(interfaces);
Set<Class<?>> types = new LinkedHashSet<Class<?>>(); types.add(type); for(Class<?> sin: SReflect.getSuperInterfaces(new Class[]{type}))
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(interfaces);
/** * Remove a service. * @param service The service object. * @param info The service info. */ protected void removeService(IInternalService service) { // Find service types Class<?> type = service.getServiceIdentifier().getServiceType().getType(component.getClassLoader(), component.getModel().getAllImports()); Set<Class<?>> types = new LinkedHashSet<Class<?>>(); types.add(type); for(Class<?> sin: SReflect.getSuperInterfaces(new Class[]{type})) { if(sin.isAnnotationPresent(Service.class)) { types.add(sin); } } IServiceRegistry registry = ServiceRegistry.getRegistry(component.getComponentIdentifier()); if(registry!=null) // Maybe null on rescue thread (todo: why remove() on rescue thread?) { for(Class<?> servicetype: types) { registry.removeService(new ClassInfo(servicetype), service); } } }
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces); for(int i=0; i<allinterfaces.length; i++)
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces); for(int i=0; i<allinterfaces.length; i++)
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces); for(int i=0; i<allinterfaces.length; i++)
List<Class<?>> allcz = SUtil.arrayToList(SReflect.getSuperInterfaces(new Class[]{IBDIAgent.class})); allcz.add(IBDIAgent.class);
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces);
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces);
Class<?>[] allinterfaces = SReflect.getSuperInterfaces(remoteinterfaces);