Solved

Determining Interfaces implemented at Runtime

Posted on 1998-06-03
1
202 Views
Last Modified: 2010-04-16
Is there a way to determine at runtime what interfaces an object implements?
0
Comment
Question by:Renae
1 Comment
 
LVL 4

Accepted Solution

by:
evijay earned 50 total points
Comment Utility
Suppose you want to determine interfaces implemented by some object o. Do the following

Class[] list = o.getClass().getInterfaces();
for (int i = 0; i < list.length; i++)
System.out.println(list[i].getName());

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count8 challlenge 13 84
countX 22 68
Securing Jmx Console and web console 2 45
Java and GPO 11 45
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

762 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

8 Experts available now in Live!

Get 1:1 Help Now