Skip to content

Instantly share code, notes, and snippets.

@ipapaste
Created March 25, 2017 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipapaste/213204724856b93521ea665cc79c64e6 to your computer and use it in GitHub Desktop.
Save ipapaste/213204724856b93521ea665cc79c64e6 to your computer and use it in GitHub Desktop.
public class MyComponent {
private MyOtherComponentImpl otherComponent = Registry.get("MyOtherComponent", this);
private MyThirdComponent thirdComponent = otherComponent.getFactory(Registry.get("config"));
public MyComponent performAction()
{
if(otherComponent.isConditionOk())
{
innerAction();
otherComponent.supply(this);
thirdComponent.ifActive(() -> this::innerAction);
MyThirdComponent.finalizeExecution(this);
}
return this;
}
private void innerAction()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment