Class Symbol.Builder
java.lang.Object
software.amazon.smithy.codegen.core.Symbol.Builder
- All Implemented Interfaces:
SmithyBuilder<Symbol>
- Enclosing class:
- Symbol
Builds a Symbol.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddDependency
(String packageName, String version) Add a symbol dependency.addDependency
(String dependencyType, String packageName, String version) Add a symbol dependency.addDependency
(SymbolDependencyContainer dependency) Add a symbol dependency.addReference
(Symbol reference) Add a symbol reference to indicate that this symbol points to or contains references to other symbols.addReference
(SymbolReference reference) Add a symbol reference to indicate that this symbol points to or contains references to other symbols.build()
Creates an immutable object that is created from the properties that have been set on the builder.declarationFile
(String declarationFile) Sets the filename of where this symbol is declared.definitionFile
(String definitionFile) Sets the filename of where this symbol is defined.dependencies
(List<SymbolDependency> dependencies) Replaces the symbol dependencies of the symbol.dependencies
(SymbolDependencyContainer container) Replaces the symbol dependencies of the symbol.Sets the unqualified name of the symbol.Sets the namespace and namespace delimiter of the symbol.properties
(Map<String, Object> properties) Replaces all of the custom properties.putProperty
(String key, Object value) Sets a specific custom property.references
(List<SymbolReference> references) Replaces the symbol references to the symbol.removeProperty
(String key) Removes a specific custom property.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 interfaceSmithyBuilder<Symbol>
- Returns:
- an instance of T
-
name
Sets the unqualified name of the symbol.- Parameters:
name
- Name to set.- Returns:
- Returns the builder.
-
namespace
Sets the namespace and namespace delimiter of the symbol.- Parameters:
namespace
- Namespace to set.namespaceDelimiter
- Namespace delimiter to set.- Returns:
- Returns the builder.
-
definitionFile
Sets the filename of where this symbol is defined.This value defaults to the value provided for
declarationFile
if not present. One of adefinitionFile
or adeclarationFile
must be provided for every Symbol.- Parameters:
definitionFile
- Filename of where the symbol is defined.- Returns:
- Returns the builder.
-
declarationFile
Sets the filename of where this symbol is declared.This value defaults to the value provided for
definitionFile
if not present. One of adefinitionFile
or adeclarationFile
must be provided for every Symbol.- Parameters:
declarationFile
- Filename of where the symbol is declared.- Returns:
- Returns the builder.
-
references
Replaces the symbol references to the symbol.- Parameters:
references
- References to set.- Returns:
- Returns the builder.
-
addReference
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
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
Replaces the symbol dependencies of the symbol.- Parameters:
dependencies
- Dependencies to set.- Returns:
- Returns the builder.
-
dependencies
Replaces the symbol dependencies of the symbol.- Parameters:
container
- Dependencies to set.- Returns:
- Returns the builder.
-
addDependency
Add a symbol dependency.- Parameters:
dependency
- Symbol dependency to add.- Returns:
- Returns the builder.
-
addDependency
Add a symbol dependency.- Parameters:
packageName
- Name of the package to depend on.version
- Version to depend on.- Returns:
- Returns the builder.
-
addDependency
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
Sets a specific custom property.- Parameters:
key
- Key to set.value
- Value to set.- Returns:
- Returns the builder.
-
removeProperty
Removes a specific custom property.- Parameters:
key
- Key to remove.- Returns:
- Returns the builder.
-
properties
Replaces all of the custom properties.- Parameters:
properties
- Custom properties to replace with.- Returns:
- Returns the builder.
-