Skip to content

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

@TimeBather

Description

@TimeBather

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions