I just found it in the API and would like to see one or two examples along with an explanation what it is good for.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Proxy trait provides a useful basis for creating delegates, but note that it only provides implementations of the methods in
Any(equals,hashCode, andtoString). You will have to implement any additional forwarding methods yourself. Proxy is often used with the pimp-my-library pattern:The standard library also contains a set of traits that are useful for creating collection proxies (
SeqProxy,SetProxy,MapProxy, etc).Finally, there is a compiler plugin in the scala-incubator (the AutoProxy plugin) that will automatically implement forwarding methods. See also this question.