Created
November 18, 2011 17:18
-
-
Save jconnolly/1377096 to your computer and use it in GitHub Desktop.
iterate through methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else { | |
for (Method method : JsonNode.class.getMethods()){ | |
try { | |
System.out.println(method.getName()+": "+method.invoke(payloadJson, null)); | |
} catch (IllegalArgumentException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} catch (IllegalAccessException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} catch (InvocationTargetException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
} | |
Map<String, Object> payload = mapper.readValue(payloadJson, Map.class); | |
((ISwarmJsonMessageListener)listener).messageRecieved(payload, swarmId, resourceId, isPublic); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment