Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Determining if a Class "informally" implements an interface #25

Closed
GoogleCodeExporter opened this issue Jan 21, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. ClassUtils.isImplementationOf only checks whether a class officially 
implements an interface (i.e. whether the class definition includes the phrase 
"Class extends Whatever implements Interface").
2. There is no method for determining whether a class actually contains all of 
the methods necessary to fulfill an interface's implementation.

What is the expected output? What do you see instead?
A method for determining if a class implements all of the methods necessary to 
fulfill an interface.

What version of the product are you using? On what operating system?
Latest trunk, revision 317, Windows XP.

Please provide any additional information below.
Attached is a patch to ClassUtils that introduces a new method, 
"isInformalImplementationOf", that functions as desired.  The patch also adds 
appropriate tests to ClassUtilsTest.  This functionality is useful when 
applying a standard interface wrapper around classes for which one lacks source 
control.

Original issue reported on code.google.com by zachary....@gmail.com on 26 Jul 2010 at 12:28

@GoogleCodeExporter
Copy link
Author

Tweaked patch to better match coding style of as3-commons.  Also improved 
checking for number-of-parameters mismatch.

Original comment by zachary....@gmail.com on 11 Aug 2010 at 5:16

Attachments:

@GoogleCodeExporter
Copy link
Author

Ok, so this completely escaped my attention, so now, finally after an eternity 
I've applied the patch. Thank you very much for sharing!

Original comment by ihatelivelyids on 26 Dec 2010 at 10:28

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant