Class TypeSection.TypeDefinition

    • Constructor Detail

      • TypeDefinition

        public TypeDefinition​(IDescriptionPart parent)
        Constructor for empty definition.
        Parameters:
        parent - the parent object, cannot be null.
      • TypeDefinition

        public TypeDefinition​(IDescriptionPart parent,
                              String typeName)
        Constructor. Creates type definition for type with special name
        Parameters:
        parent - the parent object, cannot be null.
        typeName - name of the type, cannot be null
    • Method Detail

      • getParent

        public IDescriptionPart getParent()
        Gets the parent object.
        Specified by:
        getParent in interface IDescriptionPart
        Returns:
        the parent object, can return null if it is created separetly form parsing
      • getTypeName

        public String getTypeName()
        Gets type name of the definition type
        Returns:
        type name of the definition type, never null
      • setTypeName

        public void setTypeName​(String typeName)
        Sets type name of the definition type
        Parameters:
        typeName - type name of the definition type, cannot be null
      • addContainType

        public void addContainType​(TypeSection.TypeDefinition containType)
        Adds TypeSection.TypeDefinition of type that should be contains as element of collection for this type
        Parameters:
        containType - type that should be contains as element of collection for this type, cannot be null
      • setNameOffset

        public void setNameOffset​(int offset)
        Sets offset on the line of begining type name
        Parameters:
        offset - on the line of begining type name
      • getNameOffset

        public int getNameOffset()
        Gets offset on the line of begining type name
        Returns:
        offset on the line of begining type name
      • setLineNumber

        public void setLineNumber​(int lineNumber)
        Sets line number of starting type definition
        Parameters:
        lineNumber - line number of starting type definition, line number compute from the start comment section
      • getLineNumber

        public int getLineNumber()
        Gets line number of starting type definition
        Specified by:
        getLineNumber in interface IDescriptionPart
        Returns:
        lineNumber line number of starting type definition, line number compute from the start comment section
      • getLinkToExtensionFields

        public LinkPart getLinkToExtensionFields()
        Gets special LinkPart links to extension fields from another documentation comment
        Returns:
        LinkPart links to extension fields from another documentation comment, can be null if there is no link
      • setLinkToExtensionFields

        public void setLinkToExtensionFields​(LinkPart linkToExtensionFields)
        Sets special LinkPart links to extension fields from another documentation comment
        Parameters:
        linkToExtensionFields - LinkPart links to extension fields from another documentation comment, can be null if there is no link
      • getOffset

        public int getOffset()
        Description copied from interface: IDescriptionPart
        Gets offset of the begining part. Offset - local inline offset
        Specified by:
        getOffset in interface IDescriptionPart
        Returns:
        offset of the begining part.
      • match

        public boolean match​(int lineNumber,
                             int offset)
        Description copied from interface: IDescriptionPart
        Checks that this description part corresponding to the concrete line number and offset
        Specified by:
        match in interface IDescriptionPart
        Parameters:
        lineNumber - number of the documentation comment line
        offset - local offset on the comment line
        Returns:
        true if this description part corresponding to the send line number and offset, false otherwise