Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public class MyComponent {
  2.  
  3. private MyOtherComponentImpl otherComponent = Registry.get("MyOtherComponent", this);
  4. private MyThirdComponent thirdComponent = otherComponent.getFactory(Registry.get("config"));
  5.  
  6. public MyComponent performAction()
  7. {
  8. if(otherComponent.isConditionOk())
  9. {
  10. innerAction();
  11. otherComponent.supply(this);
  12. thirdComponent.ifActive(() -> this::innerAction);
  13. MyThirdComponent.finalizeExecution(this);
  14. }
  15. }
  16.  
  17. private void innerAction()
  18. {
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement