Class StructMember.MemberTypeSegment

  • All Implemented Interfaces:
    java.lang.Comparable<PathSegment>
    Enclosing class:
    StructMember

    public class StructMember.MemberTypeSegment
    extends DecoratedDefSeg
    Implement a decorated type segment for members that is implicitly tied to the StructMember (see the beginning of the ultimate private StructMember constructor).

    This ensures that members that are hosted by or aliases into other members can get a reference to the containing structure. Via this object's .getMember(), then .getOwner().

    When the member is a nested structure, instead of using the inner segment of the Decorated segment, use the nesting segment of the inner structure. We rely on the self-referential functionality in StructDef.getNestingSeg().

    This ensures that all methods that look up the member's structure type will get the instance from innerstruct. Including type segments created on the fly by alias following.