Class SymbolReference.Builder

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SymbolReference.Builder alias​(java.lang.String alias)
      Adds an alias to the SymbolReference.
      SymbolReference build()
      Creates an immutable object that is created from the properties that have been set on the builder.
      SymbolReference.Builder options​(java.util.Set<SymbolReference.Option> options)
      Replaces the Set of Options to the SymbolReference.
      SymbolReference.Builder options​(SymbolReference.Option... options)
      Replaces the array of Options in the SymbolReference.
      T properties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
      Replaces all the custom properties.
      T putProperty​(java.lang.String key, java.lang.Object value)
      Sets a specific custom property.
      <K> T putProperty​(Property<K> property, K value)
      Sets a specific, typed custom property.
      T removeProperty​(java.lang.String key)
      Removes a specific custom property.
      T removeProperty​(Property<?> property)
      Removes a specific, typed custom property.
      SymbolReference.Builder symbol​(Symbol symbol)
      Sets the Symbol referenced by the SymbolReference.
      T typedProperties​(java.util.Map<Property<?>,​java.lang.Object> properties)
      Replaces all the custom typed properties.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • symbol

        public SymbolReference.Builder symbol​(Symbol symbol)
        Sets the Symbol referenced by the SymbolReference.
        Parameters:
        symbol - Symbol to reference.
        Returns:
        Returns the builder.
      • alias

        public SymbolReference.Builder alias​(java.lang.String alias)
        Adds an alias to the SymbolReference.

        An alias is used in some programming languages to change the way a symbol is referenced in a source file. Aliases are often used for de-conflicting symbols.

        Parameters:
        alias - Alias to assign the symbol.
        Returns:
        Returns the builder.
      • putProperty

        public T putProperty​(java.lang.String key,
                             java.lang.Object value)
        Sets a specific custom property.
        Parameters:
        key - Key to set.
        value - Value to set.
        Returns:
        Returns the builder.
      • putProperty

        public <K> T putProperty​(Property<K> property,
                                 K value)
        Sets a specific, typed custom property.
        Parameters:
        property - Key to set.
        value - Value to set.
        Returns:
        Returns the builder.
      • removeProperty

        public T removeProperty​(java.lang.String key)
        Removes a specific custom property.
        Parameters:
        key - Key to remove.
        Returns:
        Returns the builder.
      • removeProperty

        public T removeProperty​(Property<?> property)
        Removes a specific, typed custom property.
        Parameters:
        property - Property to remove.
        Returns:
        Returns the builder.
      • properties

        public T properties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
        Replaces all the custom properties.
        Parameters:
        properties - Custom properties to replace with.
        Returns:
        Returns the builder.
      • typedProperties

        public T typedProperties​(java.util.Map<Property<?>,​java.lang.Object> properties)
        Replaces all the custom typed properties.
        Parameters:
        properties - Custom typed properties to replace with.
        Returns:
        Returns the builder.