Class Symbol.Builder

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Symbol.Builder addDependency​(java.lang.String packageName, java.lang.String version)
      Add a symbol dependency.
      Symbol.Builder addDependency​(java.lang.String dependencyType, java.lang.String packageName, java.lang.String version)
      Add a symbol dependency.
      Symbol.Builder addDependency​(SymbolDependencyContainer dependency)
      Add a symbol dependency.
      Symbol.Builder addReference​(Symbol reference)
      Add a symbol reference to indicate that this symbol points to or contains references to other symbols.
      Symbol.Builder addReference​(SymbolReference reference)
      Add a symbol reference to indicate that this symbol points to or contains references to other symbols.
      Symbol build()
      Creates an immutable object that is created from the properties that have been set on the builder.
      Symbol.Builder declarationFile​(java.lang.String declarationFile)
      Sets the filename of where this symbol is declared.
      Symbol.Builder definitionFile​(java.lang.String definitionFile)
      Sets the filename of where this symbol is defined.
      Symbol.Builder dependencies​(java.util.List<SymbolDependency> dependencies)
      Replaces the symbol dependencies of the symbol.
      Symbol.Builder dependencies​(SymbolDependencyContainer container)
      Replaces the symbol dependencies of the symbol.
      Symbol.Builder name​(java.lang.String name)
      Sets the unqualified name of the symbol.
      Symbol.Builder namespace​(java.lang.String namespace, java.lang.String namespaceDelimiter)
      Sets the namespace and namespace delimiter of the symbol.
      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.
      Symbol.Builder references​(java.util.List<SymbolReference> references)
      Replaces the symbol references to the symbol.
      T removeProperty​(java.lang.String key)
      Removes a specific custom property.
      T removeProperty​(Property<?> property)
      Removes a specific, typed custom property.
      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
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public Symbol build()
        Description copied from interface: SmithyBuilder
        Creates an immutable object that is created from the properties that have been set on the builder.
        Specified by:
        build in interface SmithyBuilder<Symbol>
        Returns:
        an instance of T
      • name

        public Symbol.Builder name​(java.lang.String name)
        Sets the unqualified name of the symbol.
        Parameters:
        name - Name to set.
        Returns:
        Returns the builder.
      • namespace

        public Symbol.Builder namespace​(java.lang.String namespace,
                                        java.lang.String namespaceDelimiter)
        Sets the namespace and namespace delimiter of the symbol.
        Parameters:
        namespace - Namespace to set.
        namespaceDelimiter - Namespace delimiter to set.
        Returns:
        Returns the builder.
      • definitionFile

        public Symbol.Builder definitionFile​(java.lang.String definitionFile)
        Sets the filename of where this symbol is defined.

        This value defaults to the value provided for declarationFile if not present. One of a definitionFile or a declarationFile must be provided for every Symbol.

        Parameters:
        definitionFile - Filename of where the symbol is defined.
        Returns:
        Returns the builder.
      • declarationFile

        public Symbol.Builder declarationFile​(java.lang.String declarationFile)
        Sets the filename of where this symbol is declared.

        This value defaults to the value provided for definitionFile if not present. One of a definitionFile or a declarationFile must be provided for every Symbol.

        Parameters:
        declarationFile - Filename of where the symbol is declared.
        Returns:
        Returns the builder.
      • references

        public Symbol.Builder references​(java.util.List<SymbolReference> references)
        Replaces the symbol references to the symbol.
        Parameters:
        references - References to set.
        Returns:
        Returns the builder.
      • addReference

        public Symbol.Builder addReference​(Symbol reference)
        Add a symbol reference to indicate that this symbol points to or contains references to other symbols.
        Parameters:
        reference - Symbol that is referenced.
        Returns:
        Returns the builder.
      • addReference

        public Symbol.Builder addReference​(SymbolReference reference)
        Add a symbol reference to indicate that this symbol points to or contains references to other symbols.
        Parameters:
        reference - Symbol reference to add.
        Returns:
        Returns the builder.
      • dependencies

        public Symbol.Builder dependencies​(java.util.List<SymbolDependency> dependencies)
        Replaces the symbol dependencies of the symbol.
        Parameters:
        dependencies - Dependencies to set.
        Returns:
        Returns the builder.
      • dependencies

        public Symbol.Builder dependencies​(SymbolDependencyContainer container)
        Replaces the symbol dependencies of the symbol.
        Parameters:
        container - Dependencies to set.
        Returns:
        Returns the builder.
      • addDependency

        public Symbol.Builder addDependency​(SymbolDependencyContainer dependency)
        Add a symbol dependency.
        Parameters:
        dependency - Symbol dependency to add.
        Returns:
        Returns the builder.
      • addDependency

        public Symbol.Builder addDependency​(java.lang.String packageName,
                                            java.lang.String version)
        Add a symbol dependency.
        Parameters:
        packageName - Name of the package to depend on.
        version - Version to depend on.
        Returns:
        Returns the builder.
      • addDependency

        public Symbol.Builder addDependency​(java.lang.String dependencyType,
                                            java.lang.String packageName,
                                            java.lang.String version)
        Add a symbol dependency.
        Parameters:
        dependencyType - Type of dependency.
        packageName - Name of the package to depend on.
        version - Version to depend on.
        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.