Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 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. return this;
  16. }
  17.  
  18. private void innerAction()
  19. {
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement