Skip to content

Instantly share code, notes, and snippets.

@nschlimm
Created August 5, 2011 16:06
Show Gist options
  • Save nschlimm/1127869 to your computer and use it in GitHub Desktop.
Save nschlimm/1127869 to your computer and use it in GitHub Desktop.
Decorator example 3
package com.mycompany.springapp.springcdi;
import javax.decorator.Decorator;
import javax.decorator.Delegate;
@Decorator
public class MyServiceSecurityDecorator implements MyService {
@Delegate
private MyService delegate;
public String sayHello() {
// do some security stuff
return delegate.sayHello();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment