Class SymbolReference.Builder
- java.lang.Object
-
- software.amazon.smithy.codegen.core.SymbolReference.Builder
-
- All Implemented Interfaces:
software.amazon.smithy.utils.SmithyBuilder<SymbolReference>
- Enclosing class:
- SymbolReference
public static final class SymbolReference.Builder extends java.lang.Object implements software.amazon.smithy.utils.SmithyBuilder<SymbolReference>
Builds a SymbolReference.
-
-
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()
SymbolReference.Builder
options(java.util.Set<SymbolReference.Option> options)
Adds a Set of Options to the SymbolReference.SymbolReference.Builder
options(SymbolReference.Option... options)
Adds an array of Options to the SymbolReference.T
properties(java.util.Map<java.lang.String,java.lang.Object> properties)
Replaces all of the custom properties.T
putProperty(java.lang.String key, java.lang.Object value)
Sets a specific custom property.T
removeProperty(java.lang.String key)
Removes a specific custom property.SymbolReference.Builder
symbol(Symbol symbol)
Sets the Symbol referenced by the SymbolReference.
-
-
-
Method Detail
-
build
public SymbolReference build()
- Specified by:
build
in interfacesoftware.amazon.smithy.utils.SmithyBuilder<SymbolReference>
-
symbol
public SymbolReference.Builder symbol(Symbol symbol)
Sets the Symbol referenced by the SymbolReference.- Parameters:
symbol
- Symbol to reference.- Returns:
- Returns the builder.
-
options
public SymbolReference.Builder options(java.util.Set<SymbolReference.Option> options)
Adds a Set of Options to the SymbolReference.- Parameters:
options
- Options to add.- Returns:
- Returns the builder.
-
options
public SymbolReference.Builder options(SymbolReference.Option... options)
Adds an array of Options to the SymbolReference.- Parameters:
options
- Options to add.- 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.
-
removeProperty
public T removeProperty(java.lang.String key)
Removes a specific custom property.- Parameters:
key
- Key to remove.- Returns:
- Returns the builder.
-
properties
public T properties(java.util.Map<java.lang.String,java.lang.Object> properties)
Replaces all of the custom properties.- Parameters:
properties
- Custom properties to replace with.- Returns:
- Returns the builder.
-
-