Class SourceConstruct

    • Constructor Detail

      • SourceConstruct

        public SourceConstruct​(IElement parent,
                               java.lang.String name)
        Creates a handle for a source construct with the given parent element and the given name.
        Parameters:
        parent - the parent of the element (not null)
        name - the name of the element, or null if the element has no name
    • Method Detail

      • getOccurrenceCount_

        public final int getOccurrenceCount_()
        Description copied from interface: ISourceConstructImplExtension
        Returns the count used to distinguish source constructs that would otherwise be equal (such as two fields with the same name in the same type). Numbering starts at 1 (thus the first occurrence is occurrence 1, not occurrence 0).
        Specified by:
        getOccurrenceCount_ in interface ISourceConstructImplExtension
        Returns:
        the occurrence count for this element
      • setOccurrenceCount_

        public void setOccurrenceCount_​(int occurrenceCount)
        Description copied from interface: ISourceConstructImplExtension
        Sets the occurrence count for this element.

        This method is intended to be used only when building the structure of a source file to distinguish source constructs that would otherwise be equal.

        Specified by:
        setOccurrenceCount_ in interface ISourceConstructImplExtension
        Parameters:
        occurrenceCount - the occurrence count for this element (> 0)