Skip to content

Instantly share code, notes, and snippets.

@peter-lawrey
Created January 20, 2015 18:35
Show Gist options
  • Save peter-lawrey/9235d0f4faa28e2d01f9 to your computer and use it in GitHub Desktop.
Save peter-lawrey/9235d0f4faa28e2d01f9 to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
Stream.of(Boolean.class, Byte.class, Character.class, Short.class, Integer.class,
Long.class, Float.class, Double.class, Void.class).map(c -> {
try {
return c.getField("TYPE").get(null);
} catch (Exception e) {
throw new AssertionError(e);
}
}).forEach(System.out::println);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment