|
Scala example source code file (J_2.java)
The Scala J_2.java source codeimport java.lang.reflect.*; public class J_2 { public void f1(Class<?> clazz) { Field[] fields = clazz.getDeclaredFields(); for (int i = 0 ; i < fields.length; i++) { String name = fields[i].getName(); if (name.length() >= 7 && name.substring(0, 7).equals("bitmap$")) { } else System.out.println("(" + name + "," + fields[i].getGenericType() + ")"); } } public void f2(Class<?> clazz) { Method[] methods = clazz.getDeclaredMethods(); for (int i = 0 ; i < methods.length; i++) { String name = methods[i].getName(); if (name.length() >= 7 && name.substring(0, 7).equals("bitmap$")) { } else System.out.println("(" + name + "," + methods[i].getGenericReturnType() + ")"); } } public void javaRun() { f1(One.class); f2(One.class); f1(Two.class); f2(Two.class); } } Other Scala examples (source code examples)Here is a short list of links related to this Scala J_2.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.