get Declared Methods from generic method - Java Reflection

Java examples for Reflection:Method

Description

get Declared Methods from generic method

Demo Code


//package com.java2s;

import java.lang.reflect.Method;

public class Main {
    public static <T> Method[] getDeclaredMethods(T item) {
        return item.getClass().getDeclaredMethods();
    }//from w w w .  j  a va 2  s. c o m
}

Related Tutorials