Created
October 30, 2012 07:06
-
-
Save nbeloglazov/3978729 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Overridden callMethods | |
| Default callMethods | |
| Overridden callMethods2 | |
| Expected: | |
| Overridden callMethods | |
| Overridden callMethods | |
| Overridden callMethods2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (let [obj | |
| (proxy [example.Test] [] | |
| (callMethods | |
| ([] (println "Overridden call methods")) | |
| ([obj] (proxy-super callMethods obj))) | |
| (callMethods2 | |
| ([] (println "Overridden call methods2"))))] | |
| (.callMethods obj) | |
| (.callMethods obj :test)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package example; | |
| public abstract class Test { | |
| public void callMethods(Object obj){ | |
| callMethods(); | |
| callMethods2(); | |
| } | |
| public void callMethods() { | |
| System.out.println("Default callMethods"); | |
| } | |
| public void callMethods2() { | |
| System.out.println("Default callMethods2"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment