Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8637633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:31:32+00:00 2026-06-12T10:31:32+00:00

I have to choose between two complicated interfaces for a method parameter: InterfaceParent and

  • 0

I have to choose between two complicated interfaces for a method parameter: InterfaceParent and InterfaceChild.

The interface InterfaceChild extends the interface InterfaceParent and one of them will become part of methodX‘s signature, depending on which interface I find more fitting.

By definition, InterfaceParent and InterfaceChild share many methods so comparing them is difficult by looking just at the source files. This is problem I am having.

How do I quickly compare and view differences between two interfaces using Eclipse?


Read more for an explanatory scenario or stop reading now if the description above was sufficient:

Think of interface java.util.Collection<E> as InterfaceParent and interface java.util.List<E> as InterfaceChild. Imagine I had to choose between them.

This case is similar to mine because List<E> extends Collection<E> and thus the interfaces share many methods.

Try looking at the source files for these two interfaces: both files have “stubs” for all methods so comparing them at a glance is very difficult by laying out two code editors next to one other.

Collection<E> and List<E> are small interfaces by comparison so my problem is even bigger than this but let’s stay with Collection<E> and List<E> in our example for simplicity’s sake.

I wish I could use my IDE (Eclipse) to show me the differences of these interfaces, or a command line tool to output the method signatures of both.

With a comman line tool, I could dump the output to text files, sort the files and run a diff tool to see the differences, hiding the common methods.

In the example, I could quickly find out which methods are defined on List<E> which are not defined on Collection<E>, and choose one interface or the other for methodX based on this difference.

I am not aware of any tools which perform this sort of “reflection” on Java objects so that one may pass to them a fully qualified class name and get a public interface definition output stream. Please let me know if there are any.

Clearly doing this using a command line tool would become tedious after a while so I am wondering: is there something similar in Eclipse? The Outline feature is perfect for an at-a-glance overview of a type, but could I compare two Outlines? The “code folding” feature is great to reduce a source file to just “names of methods” but there is nothing that hides common methods between two interfaces and shows the differences?

How would you go about doing this sort of thing without leaving Eclipse?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:31:33+00:00Added an answer on June 12, 2026 at 10:31 am

    Select two interfaces and right click on them
    Choose Compare with –> each other

    Compare eachOthe

    image source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if you have to choose between two image application on a mac Drawit ($38)
I'm in a situation where i have to choose between two types of cards,
I have two models with a foreign key relationship between them. In the admin,
I find my self in a situation where I have to choose between either
I have to choose a database for implementing a sharing system. My system will
I don't know anything about either library but I have to choose one of
I have a class called Cell with two properties. One is called Value of
It appears that I am not able to choose between two names for a
I have a form, which allows the user to change dependencies between two kinds
I have the following XML: <sample> <value1>This is one</value1> <value2>Number two</value2> <value4>Last value</value4> </sample>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.