public class DefaultNamingStrategy extends Object implements NamingStrategy
| Constructor and Description |
|---|
DefaultNamingStrategy(ServiceModel serviceModel,
CustomizationConfig customizationConfig) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBeanStyleGetterMethodName(String memberName,
Shape parentShape,
Shape c2jShape) |
String |
getBeanStyleSetterMethodName(String memberName,
Shape parentShape,
Shape c2jShape) |
String |
getClientPackageName(String serviceName)
Retrieve the client package name that should be used based on the service name.
|
String |
getEndpointRulesPackageName(String serviceName)
Retrieve the endpoint rules package name that should be used based on the service name.
|
String |
getEnumValueName(String enumValue) |
String |
getExceptionName(String errorShapeName) |
String |
getExistenceCheckMethodName(String memberName,
Shape parentShape)
Names a method that would check for existence of the member in the response.
|
String |
getFluentEnumGetterMethodName(String memberName,
Shape parentShape,
Shape shape) |
String |
getFluentEnumSetterMethodName(String memberName,
Shape parentShape,
Shape shape) |
String |
getFluentGetterMethodName(String memberName,
Shape parentShape,
Shape shape) |
String |
getFluentSetterMethodName(String memberName,
Shape parentShape,
Shape shape) |
String |
getModelPackageName(String serviceName)
Retrieve the model package name that should be used based on the service name.
|
String |
getPaginatorsPackageName(String serviceName)
Retrieve the paginators package name that should be used based on the service name.
|
String |
getRequestClassName(String operationName) |
String |
getRequestTransformPackageName(String serviceName)
Retrieve the request transform package name that should be used based on the service name.
|
String |
getResponseClassName(String operationName) |
String |
getSdkFieldFieldName(MemberModel memberModel)
Stuttering is intentional, returns the name of the
SdkField field. |
String |
getServiceName()
Retrieve the service name that should be used based on the model.
|
String |
getShapeClassName(String shapeName) |
String |
getSmokeTestPackageName(String serviceName)
Retrieve the smote test package name that should be used based on the service name.
|
String |
getTransformPackageName(String serviceName)
Retrieve the transform package name that should be used based on the service name.
|
String |
getUnionEnumTypeName(MemberModel memberModel)
Returns the name of the provided member as if it will be included in an enum (as in, when the parent shape is a union
and we need to create an enum with each member name in it).
|
String |
getVariableName(String name) |
String |
getWaitersPackageName(String serviceName)
Retrieve the waiters package name that should be used based on the service name.
|
void |
validateCustomerVisibleNaming(IntermediateModel trimmedModel)
Verify the customer-visible naming in the provided intermediate model will compile and is idiomatic to Java.
|
public DefaultNamingStrategy(ServiceModel serviceModel, CustomizationConfig customizationConfig)
public String getServiceName()
NamingStrategygetServiceName in interface NamingStrategypublic String getClientPackageName(String serviceName)
NamingStrategygetClientPackageName in interface NamingStrategypublic String getModelPackageName(String serviceName)
NamingStrategygetModelPackageName in interface NamingStrategypublic String getTransformPackageName(String serviceName)
NamingStrategygetTransformPackageName in interface NamingStrategypublic String getRequestTransformPackageName(String serviceName)
NamingStrategygetRequestTransformPackageName in interface NamingStrategypublic String getPaginatorsPackageName(String serviceName)
NamingStrategygetPaginatorsPackageName in interface NamingStrategypublic String getWaitersPackageName(String serviceName)
NamingStrategygetWaitersPackageName in interface NamingStrategypublic String getEndpointRulesPackageName(String serviceName)
NamingStrategygetEndpointRulesPackageName in interface NamingStrategypublic String getSmokeTestPackageName(String serviceName)
NamingStrategygetSmokeTestPackageName in interface NamingStrategypublic String getExceptionName(String errorShapeName)
getExceptionName in interface NamingStrategyerrorShapeName - Name of error shape to derive exception class name from.public String getRequestClassName(String operationName)
getRequestClassName in interface NamingStrategyoperationName - Name of operation used to derive request class name.public String getResponseClassName(String operationName)
getResponseClassName in interface NamingStrategyoperationName - Name of operation used to derive response class name.public String getVariableName(String name)
getVariableName in interface NamingStrategyname - Some contextual name to derive variable name from (i.e. member name, java class name, etc).public String getEnumValueName(String enumValue)
getEnumValueName in interface NamingStrategyenumValue - Enum value as defined in the service model used to derive the java name.public String getShapeClassName(String shapeName)
getShapeClassName in interface NamingStrategyshapeName - Name of structure used to derive Java class name.public String getFluentGetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentGetterMethodName in interface NamingStrategymemberName - Member name to name getter for.shape - The shape associated with the member.public String getFluentEnumGetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentEnumGetterMethodName in interface NamingStrategymemberName - The full member to get the name for.shape - The shape associated with the member.public String getExistenceCheckMethodName(String memberName, Shape parentShape)
NamingStrategygetExistenceCheckMethodName in interface NamingStrategymemberName - The member name to get the method name for.parentShape - The shape containing the member.public String getBeanStyleGetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
getBeanStyleGetterMethodName in interface NamingStrategymemberName - Member name to name getter for.public String getBeanStyleSetterMethodName(String memberName, Shape parentShape, Shape c2jShape)
getBeanStyleSetterMethodName in interface NamingStrategymemberName - Member name to name setter for.public String getFluentSetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentSetterMethodName in interface NamingStrategymemberName - Member name to name fluent setter for.public String getFluentEnumSetterMethodName(String memberName, Shape parentShape, Shape shape)
getFluentEnumSetterMethodName in interface NamingStrategymemberName - The full member to get the name for.shape - The shape associated with the member.public String getSdkFieldFieldName(MemberModel memberModel)
NamingStrategySdkField field.getSdkFieldFieldName in interface NamingStrategymemberModel - Member to generate field name for.SdkField pojo.public String getUnionEnumTypeName(MemberModel memberModel)
NamingStrategygetUnionEnumTypeName in interface NamingStrategymemberModel - Member to generate the union enum type name for.public void validateCustomerVisibleNaming(IntermediateModel trimmedModel)
NamingStrategyvalidateCustomerVisibleNaming in interface NamingStrategyCopyright © 2023. All rights reserved.