Added volume to client plus other fixes
[stereo.git] / DAAPLib / src / util / command / PathNode.java
blob1b78043f13f6a3eac97ff9c306e86b4263a28676
1 package util.command;
3 import java.lang.reflect.Method;
4 import java.lang.reflect.Modifier;
5 import java.util.HashMap;
6 import java.util.Map;
8 public abstract class PathNode implements RequestNode {
10 public Map<String, Method> methods() {
12 Map<String, Method> methods = new HashMap<String, Method>();
14 for (Method m: this.getClass().getMethods()) {
15 if (m.getDeclaringClass() != this.getClass()) continue;
16 if (!RequestNode.class.isAssignableFrom(m.getReturnType())) continue;
17 if (m.getParameterTypes().length != 0) continue;
18 if (m.getModifiers() != Modifier.PUBLIC) continue;
19 methods.put(m.getName(), m);
22 return methods;