Class MacroId


  • public class MacroId
    extends Object
    Represents a Macro identifier. This is used when we need to pass a reference of a macro around without having to pass Macro instances; it's also required when we need to create a Macro instance from an identifier.

    A Macro is identified by 2 parameters:

    • a string representing a technical id (eg "toc")
    • an optional syntax (can be null) if the macro is only available for a given syntax
    Since:
    2.0M3
    Version:
    $Id: 160c8cb04b086b17453c2f992c92ac47e7b857da $
    • Constructor Detail

      • MacroId

        public MacroId​(String id)
        Constructor for macros registered for all syntaxes.
        Parameters:
        id - see getId()
      • MacroId

        public MacroId​(String id,
                       Syntax syntax)
        Constructor for macros registered for a specific syntax only.
        Parameters:
        id - see getId()
        syntax - see getSyntax()
    • Method Detail

      • getId

        public String getId()
        Returns:
        the technical id of the macro (eg "toc" for the TOC Macro)
      • getSyntax

        public Syntax getSyntax()
        Returns:
        the optional syntax (can be null) for which the macro represented by this id is available. If null then the macro is available for all syntaxes.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object