Class ParsedUrlSpec


  • public class ParsedUrlSpec
    extends Object
    ParsedUrlSpec is used for both ParsedAttrSpec and ParsedCdataSpec, to check URLs.
    Author:
    nhant01, GeorgeLuo
    • Constructor Detail

      • ParsedUrlSpec

        public ParsedUrlSpec​(@Nonnull
                             dev.amp.validator.ValidatorProtos.UrlSpec urlSpec)
        Constructor.
        Parameters:
        urlSpec - the UrlSpec.
    • Method Detail

      • getSpec

        public dev.amp.validator.ValidatorProtos.UrlSpec getSpec()
        Returns the UrlSpec.
        Returns:
        returns the UrlSpec.
      • isAllowedProtocol

        public boolean isAllowedProtocol​(String protocol)
        Returns true if the protocol is found.
        Parameters:
        protocol - the allowed protocol.
        Returns:
        returns true if the protocol is found.
      • cleanup

        public void cleanup()
        Clean up reference, improve gc performance.