Skip to content

Instantly share code, notes, and snippets.

@aesteve
Created January 11, 2016 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aesteve/d11568873da61c08d5d3 to your computer and use it in GitHub Desktop.
Save aesteve/d11568873da61c08d5d3 to your computer and use it in GitHub Desktop.
Standard interceptors ?
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