Class ReservedWordSymbolProvider.Escaper
- java.lang.Object
-
- software.amazon.smithy.codegen.core.ReservedWordSymbolProvider.Escaper
-
- Enclosing class:
- ReservedWordSymbolProvider
public static final class ReservedWordSymbolProvider.Escaper extends java.lang.Object
Uses to manually escapeSymbol
s and member names.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
escapeMemberName(java.lang.String memberName)
Escapes the given member name if needed.Symbol
escapeSymbol(Shape shape, Symbol symbol)
Escapes the given symbol using the reserved words implementations registered for each component.
-
-
-
Method Detail
-
escapeSymbol
public Symbol escapeSymbol(Shape shape, Symbol symbol)
Escapes the given symbol using the reserved words implementations registered for each component.- Parameters:
shape
- Shape being turned into aSymbol
.symbol
-Symbol
to escape.- Returns:
- Returns the escaped
Symbol
.
-
escapeMemberName
public java.lang.String escapeMemberName(java.lang.String memberName)
Escapes the given member name if needed.- Parameters:
memberName
- Member name to escape.- Returns:
- Returns the possibly escaped member name.
-
-