Solved

Determining Interfaces implemented at Runtime

Posted on 1998-06-03
1
231 Views
Last Modified: 2010-04-16
Is there a way to determine at runtime what interfaces an object implements?
0
Comment
Question by:Renae
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
evijay earned 50 total points
ID: 1222055
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jboss wildfly 10.1 10 619
jsp login check 12 67
JDBC performance 8 35
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given PHP 5 44
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

751 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