jcbloch / as3-commons

Automatically exported from code.google.com/p/as3-commons
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Attachments:

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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