public class NameHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ILLEGAL_CHARACTER_REGEX |
| Constructor and Description |
|---|
NameHelper(GenerationConfig generationConfig) |
| Modifier and Type | Method and Description |
|---|---|
String |
capitalizeTrailingWords(String name) |
String |
getBuilderClassName(com.sun.codemodel.JClass outterClass) |
String |
getBuilderName(String propertyName,
com.fasterxml.jackson.databind.JsonNode node) |
String |
getClassName(String propertyName,
com.fasterxml.jackson.databind.JsonNode node) |
String |
getClassName(String nodeName,
com.fasterxml.jackson.databind.JsonNode node,
com.sun.codemodel.JPackage _package) |
String |
getFieldName(String propertyName,
com.fasterxml.jackson.databind.JsonNode node)
Get name of the field generated from property.
|
String |
getGetterName(String propertyName,
com.sun.codemodel.JType type,
com.fasterxml.jackson.databind.JsonNode node)
Generate getter method name for property.
|
String |
getPropertyName(String jsonFieldName,
com.fasterxml.jackson.databind.JsonNode node)
Convert jsonFieldName into the equivalent Java fieldname by replacing
illegal characters and normalizing it.
|
String |
getSetterName(String propertyName,
com.fasterxml.jackson.databind.JsonNode node)
Generate setter method name for property.
|
String |
getUniqueClassName(String nodeName,
com.fasterxml.jackson.databind.JsonNode node,
com.sun.codemodel.JPackage _package) |
String |
normalizeName(String name) |
String |
replaceIllegalCharacters(String name) |
public static final String ILLEGAL_CHARACTER_REGEX
public NameHelper(GenerationConfig generationConfig)
public String getPropertyName(String jsonFieldName, com.fasterxml.jackson.databind.JsonNode node)
jsonFieldName - node - public String getSetterName(String propertyName, com.fasterxml.jackson.databind.JsonNode node)
propertyName - node - public String getBuilderName(String propertyName, com.fasterxml.jackson.databind.JsonNode node)
public String getFieldName(String propertyName, com.fasterxml.jackson.databind.JsonNode node)
propertyName - node - public String getClassName(String propertyName, com.fasterxml.jackson.databind.JsonNode node)
public String getGetterName(String propertyName, com.sun.codemodel.JType type, com.fasterxml.jackson.databind.JsonNode node)
propertyName - type - node - public String getBuilderClassName(com.sun.codemodel.JClass outterClass)
public String getUniqueClassName(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.sun.codemodel.JPackage _package)
Copyright © 2019. All rights reserved.