JScratch
Loading...
Searching...
No Matches
ReflectionUtils.java
Go to the documentation of this file.
1package com.jscratch.utils;
2
3import java.lang.reflect.Method;
4import java.util.ArrayList;
5import java.util.List;
6
7public class ReflectionUtils {
8 public static String[] getAvailableMethods(Class<?> clazz) {
9 List<String> methods = new ArrayList<>();
10 for (Method m : clazz.getMethods()) {
11 if (m.getDeclaringClass() != Object.class) {
12 methods.add(m.getName());
13 }
14 }
15 return methods.toArray(new String[0]);
16 }
17}
static String[] getAvailableMethods(Class<?> clazz)