Created
January 21, 2011 23:49
-
-
Save anonymous/790661 to your computer and use it in GitHub Desktop.
This file contains 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
<amalloy> (doc proxy) | |
<sexpbot> ⟹ "Macro ([class-and-interfaces args & fs]); | |
class-and-interfaces - a vector of class names args - a (possibly | |
empty) vector of arguments to the superclass constructor. f => (name | |
[params*] body) or (name ([params*] body) ([params+] body) ...) | |
Expands to code which creates a instance of a proxy class that | |
implements the named class/interface(s) by calling the supplied fns. A | |
single class, if provided, must be first. If not provided it defaults | |
to Object. The interfaces names must be valid interface types. If a | |
method fn is not provided for a class method, the superclass methd | |
will be called. If a method fn is not provided for an interface | |
method, an UnsupportedOperationException will be thrown should it be | |
called. Method fns are closures and can capture the environment in | |
which proxy is called. Each method fn takes an additional implicit | |
first arg, which is bound to 'this. Note that while method fns can be | |
provided to override protected methods, they have no other access to | |
protected members, nor to super, as these capabilities cannot be | |
proxied." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment