How to retrieve the parameterized type of a Collection object?

Posted on 2010-01-06
Last Modified: 2013-12-22
For example:

List<Integer> abc = new ArrayList<Integer>();

What java reflection API(s) for retrieving the parameterized type of the above collection object? (i.e. Integer).
Question by:zollen
    LVL 40

    Expert Comment

    LVL 20

    Accepted Solution

    Have a look the code posted by this person -

    Look at the end of the page.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Suggested Solutions

    Title # Comments Views Activity
    wordsWithout 49 64
    sumHeights2  challenge 7 50
    How Complex Is This Java Course ? 9 51
    stringclean challenge 26 43
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    The viewer will learn how to implement Singleton Design Pattern in Java.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now