com.vaadin.flow.internal.

Class ConstantPool

    • Constructor Detail

      • ConstantPool

        public ConstantPool()
    • Method Detail

      • getConstantId

        public String getConstantId(ConstantPoolKey constant)

        Gets the id of a given constant, registering the constant with this constant pool if it hasn't already been encountered.

        Parameters:

        constant - the constant reference to get an id for, not null

        Returns:

        the constant id of the given constant, not null

        See Also:

        dumpConstants()

      • hasNewConstants

        public boolean hasNewConstants()

        Checks if any new constants have been added to this constant pool since the last time dumpConstants() was called.

        Returns:

        true if there are new constants, false otherwise

      • dumpConstants

        public elemental.json.JsonObject dumpConstants()

        Encodes all new constants to a JSON object and marks those constants as non-new.

        Returns:

        a JSON object describing all new constants