public interface Instance<T>
@Inject
private Instance<MyObject> myObjectInst;
public void listen(@Observes OtherEvent otherEvent) {
// do something..
myObjectInst.get().performSomeOperation();
// do something..
}
Modifier and Type | Method and Description |
---|---|
T |
get() |
T get()
Copyright © 2016 JBoss by Red Hat. All rights reserved.