public interface Instance<T>
@Inject
private Instance<MyObject> myObjectInst;
public void listen(@Observes OtherEvent otherEvent) {
// do something..
myObjectInst.get().performSomeOperation();
// do something..
}
T get()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.