Class ParsedAttrSpecs


  • public class ParsedAttrSpecs
    extends Object
    TagSpecs specify attributes that are valid for a particular tag. They can also reference lists of attributes (AttrLists), thereby sharing those definitions. This abstraction instantiates ParsedAttrSpec for each AttrSpec (from validator-*.protoascii, our specification file) exactly once, and provides quick access to the attr spec names as well, including for simple attr specs (those which only have a name but no specification for their value).
    Author:
    nhant01, GeorgeLuo
    • Constructor Detail

      • ParsedAttrSpecs

        public ParsedAttrSpecs​(@Nonnull
                               AMPValidatorManager validatorManager)
        Constructor.
        Parameters:
        validatorManager - the AMPValidatorManager instance.
    • Method Detail

      • getParsedAttrSpec

        public ParsedAttrSpec getParsedAttrSpec​(@Nonnull
                                                String name,
                                                @Nonnull
                                                String value,
                                                @Nonnull
                                                dev.amp.validator.ValidatorProtos.AttrSpec attrSpec)
        Returns the ParsedAttrSpec.
        Parameters:
        name - the attr spec name.
        value - the attr spec value.
        attrSpec - the AttributeSpec.
        Returns:
        returns the ParsedAttrSpec.
      • getAttrListByName

        public List<dev.amp.validator.ValidatorProtos.AttrSpec> getAttrListByName​(@Nonnull
                                                                                  String name)
        Returns the attr list by name.
        Parameters:
        name - the attr list name.
        Returns:
        returns the attr list.
      • getGlobalAttrs

        public List<dev.amp.validator.ValidatorProtos.AttrSpec> getGlobalAttrs()
        Returns the global attr list.
        Returns:
        returns the global attr list.
      • getAmpLayoutAttrs

        public List<dev.amp.validator.ValidatorProtos.AttrSpec> getAmpLayoutAttrs()
        Returns the AmpLayout attr list.
        Returns:
        returns the AmpLayout attr list.
      • cleanup

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