Created
January 11, 2016 13:15
-
-
Save aesteve/d11568873da61c08d5d3 to your computer and use it in GitHub Desktop.
Standard interceptors ?
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
class Decorated { | |
@Intercepted(MyInterceptor.class) | |
def intercepted(String something) { | |
println "within method" | |
} | |
} | |
class MyInterceptor implements Interceptor { | |
@Override | |
def before(def theObject, Method theMethod, List args) { | |
println "before $theMethod.name" | |
} | |
@Override | |
def after(def theObject, Method theMethod, List args) { | |
println "after $theMethod.name" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment