hibernate / hibernate-models

An abstraction over "reflection" and annotations
Apache License 2.0
2 stars 5 forks source link

Add MemberDetails#getAssociatedType #34

Closed sebersole closed 4 months ago

sebersole commented 4 months ago

Replacement for HCANN's XMember#getClassOrElementClass

    /**
     * For plural members, this is the {@linkplain #getElementType "element type"};
     * otherwise, this is the member's {@linkplain #getType() type}
     */
    default TypeDetails getAssociatedType() {
        return isPlural() ? getElementType() : getType();
    }