Class SymbolicName

    • Method Detail

      • getValue

        @API(status=INTERNAL)
        public String getValue()
        Returns:
        The value of this symbolic name.
      • concat

        @NotNull
        @Contract(pure=true)
        public @NotNull SymbolicName concat​(String otherValue)
        Creates a new symbolic name by concatenating otherValue to this names value. Returns this if otherValue is empty.
        Parameters:
        otherValue - The value to concat.
        Returns:
        A new symbolic name
      • project

        @NotNull
        @Contract(pure=true)
        public @NotNull MapProjection project​(List<Object> entries)
        A list will never be a valid entry for a map projection, so this convenient method prevents trying to create one from a list of objects. It will delegate to project(Object...) with the content of the list.
        Parameters:
        entries - A list of entries for the projection
        Returns:
        A map projection.
        Since:
        2021.0.0
      • project

        @NotNull
        @Contract(pure=true)
        public @NotNull MapProjection project​(Object... entries)
        Creates a map projection based on this node. The node needs a symbolic name for this to work.

        Entries of type String in entries followed by an Expression will be treated as map keys pointing to the expression in the projection, String entries alone will be treated as property lookups on the node.

        Parameters:
        entries - A list of entries for the projection
        Returns:
        A map projection.
        Since:
        2021.0.0
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • asExpression

        @NotNull
        public @NotNull Expression asExpression()
        Description copied from interface: IdentifiableElement
        Transform this element into an expression
        Specified by:
        asExpression in interface IdentifiableElement
        Returns:
        this element as an expression. Will return the same instance if it is already an expression.