Class StartTagTypeGenericImplementation

    • Constructor Detail

      • StartTagTypeGenericImplementation

        protected StartTagTypeGenericImplementation​(java.lang.String description,
                                                    java.lang.String startDelimiter,
                                                    java.lang.String closingDelimiter,
                                                    EndTagType correspondingEndTagType,
                                                    boolean isServerTag)
        Constructs a new StartTagTypeGenericImplementation object with the specified properties.
        (implementation assistance method)

        This is equivalent to calling
        new StartTagTypeGenericImplementation(description,startDelimiter,closingDelimiter,correspondingEndTagType,isServerTag,false,false).

        Parameters:
        description - a description of the new start tag type useful for debugging purposes.
        startDelimiter - the start delimiter of the new start tag type.
        closingDelimiter - the closing delimiter of the new start tag type.
        correspondingEndTagType - the corresponding end tag type of the new start tag type.
        isServerTag - indicates whether the new start tag type is a server tag.
      • StartTagTypeGenericImplementation

        protected StartTagTypeGenericImplementation​(java.lang.String description,
                                                    java.lang.String startDelimiter,
                                                    java.lang.String closingDelimiter,
                                                    EndTagType correspondingEndTagType,
                                                    boolean isServerTag,
                                                    boolean hasAttributes,
                                                    boolean isNameAfterPrefixRequired)
        Constructs a new StartTagTypeGenericImplementation object with the specified properties.
        (implementation assistance method)
        Parameters:
        description - a description of the new start tag type useful for debugging purposes.
        startDelimiter - the start delimiter of the new start tag type.
        closingDelimiter - the closing delimiter of the new start tag type.
        correspondingEndTagType - the corresponding end tag type of the new start tag type.
        isServerTag - indicates whether the new start tag type is a server tag.
        hasAttributes - indicates whether the new start tag type has attributes.
        isNameAfterPrefixRequired - indicates whether a name is required after the prefix.
    • Method Detail

      • getEnd

        protected int getEnd​(Source source,
                             int pos)
        Returns the end of a tag of this type, starting from the specified position in the specified source document.
        (implementation assistance method)

        This default implementation simply searches for the first occurrence of the closing delimiter after the specified position, and returns the position immediately after the end of it.

        If the closing delimiter is not found, the value -1 is returned.

        Parameters:
        source - the Source document.
        pos - the position in the source document.
        Returns:
        the end of a tag of this type, starting from the specified position in the specified source document, or -1 if the end of the tag can not be found.