Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add self-reference constructor supporting for Registry #9

Open
TimeBather opened this issue Oct 29, 2024 · 1 comment
Open
Labels
feature New feature or request

Comments

@TimeBather
Copy link
Contributor

Describe the problem related to the feature request

static final Reg<XXX> XXX = Reg().xxxType(XXXObject::new).submitTo(registry);

class XXX{
    XXX(){
        super(XXX.getType());
    }
}

It's bad to have a circular reference in our class constructor.

Self-reference constructor Example:

static final Reg<XXX> XXX = Reg().xxxType(XXXObject::new).submitTo(registry);

class XXX{
    XXX(XXXType type){
        super(type); // No Reference to Registry!
    }
}

Describe the solution you'd like

None

Describe alternatives you've considered

No response

Additional context

No response

@TimeBather TimeBather added the feature New feature or request label Oct 29, 2024
@TimeBather
Copy link
Contributor Author

TimeBather commented Oct 29, 2024

WIP, BlockReg.withItem self-reference-constructor supporting added in 9f7f5a1 because Create's TrackTargetingBlockItem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant