/** * Return a {@link RelaxedNames} for the given source camelCase source name. * @param name the source name in camelCase * @return the relaxed names */ public static RelaxedNames forCamelCase(String name) { return new RelaxedNames(Manipulation.CAMELCASE_TO_HYPHEN.apply(name)); }
/** * Create a new {@link RelaxedNames} instance. * @param name the source name. For the maximum number of variations specify the name * using dashed notation (e.g. {@literal my-property-name} */ public RelaxedNames(String name) { this.name = (name == null ? "" : name); initialize(RelaxedNames.this.name, this.values); }
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null); String name = descriptor.getName(); if (!name.equals("class")) { RelaxedNames relaxedNames = RelaxedNames.forCamelCase(name); if (prefixes == null) { for (String relaxedName : relaxedNames) {
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null); String name = descriptor.getName(); if (!name.equals("class")) { RelaxedNames relaxedNames = RelaxedNames.forCamelCase(name); if (prefixes == null) { for (String relaxedName : relaxedNames) {
private void buildNameDescriptorMap(String prefix, List<PropertyDescriptor> propertyDescriptors) { Iterable<String> prefixes = (StringUtils.hasLength(prefix) ? new RelaxedNames(prefix) : null); String name = descriptor.getName(); if (!name.equals("class")) { RelaxedNames relaxedNames = RelaxedNames.forCamelCase(name); if (prefixes == null) { for (String relaxedName : relaxedNames) {
/** * Create a new {@link RelaxedNames} instance. * @param name the source name. For the maximum number of variations specify the name * using dashed notation (e.g. {@literal my-property-name} */ public RelaxedNames(String name) { this.name = (name == null ? "" : name); initialize(RelaxedNames.this.name, this.values); }
/** * Return a {@link RelaxedNames} for the given source camelCase source name. * @param name the source name in camelCase * @return the relaxed names */ public static RelaxedNames forCamelCase(String name) { return new RelaxedNames(Manipulation.CAMELCASE_TO_HYPHEN.apply(name)); }
private void initialize(String name, Set<String> values) { if (values.contains(name)) { return; } for (Variation variation : Variation.values()) { for (Manipulation manipulation : Manipulation.values()) { String result = name; result = manipulation.apply(result); result = variation.apply(result); values.add(result); initialize(result, values); } } }
/** * Return a {@link RelaxedNames} for the given source camelCase source name. * @param name the source name in camelCase * @return the relaxed names */ public static RelaxedNames forCamelCase(String name) { return new RelaxedNames(Manipulation.CAMELCASE_TO_HYPHEN.apply(name)); }
private void initialize(String name, Set<String> values) { if (values.contains(name)) { return; } for (Variation variation : Variation.values()) { for (Manipulation manipulation : Manipulation.values()) { String result = name; result = manipulation.apply(result); result = variation.apply(result); values.add(result); initialize(result, values); } } }
/** * Create a new {@link RelaxedNames} instance. * @param name the source name. For the maximum number of variations specify the name * using dashed notation (e.g. {@literal my-property-name} */ public RelaxedNames(String name) { this.name = (name == null ? "" : name); initialize(RelaxedNames.this.name, this.values); }
private void initialize(String name, Set<String> values) { if (values.contains(name)) { return; } for (Variation variation : Variation.values()) { for (Manipulation manipulation : Manipulation.values()) { String result = name; result = manipulation.apply(result); result = variation.apply(result); values.add(result); initialize(result, values); } } }