org.springframework.core.Constants.getNames()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.springframework.core.Constants.getNames()方法的一些代码示例,展示了Constants.getNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Constants.getNames()方法的具体详情如下:
包路径:org.springframework.core.Constants
类名称:Constants
方法名:getNames

Constants.getNames介绍

[英]Return all names of the given group of constants.

Note that this method assumes that constants are named in accordance with the standard Java convention for constant values (i.e. all uppercase). The supplied namePrefixwill be uppercased (in a locale-insensitive fashion) prior to the main logic of this method kicking in.
[中]返回给定常量组的所有名称。
请注意,此方法假定常量的命名符合常量值的标准Java约定(即所有大写)。在该方法的主逻辑开始之前,提供的NamePrefix将以大写形式(不区分区域设置)显示。

代码示例

代码示例来源:origin: spring-projects/spring-framework

/**
 * Return all names of the group of constants for the
 * given bean property name.
 * @param propertyName the name of the bean property
 * @return the set of values
 * @see #propertyToConstantNamePrefix
 */
public Set<String> getNamesForProperty(String propertyName) {
  return getNames(propertyToConstantNamePrefix(propertyName));
}

代码示例来源:origin: org.springframework/spring-core

/**
 * Return all names of the group of constants for the
 * given bean property name.
 * @param propertyName the name of the bean property
 * @return the set of values
 * @see #propertyToConstantNamePrefix
 */
public Set<String> getNamesForProperty(String propertyName) {
  return getNames(propertyToConstantNamePrefix(propertyName));
}

代码示例来源:origin: spring-projects/spring-framework

@Test
public void getNames() {
  Constants c = new Constants(A.class);
  Set<?> names = c.getNames("");
  assertEquals(c.getSize(), names.size());
  assertTrue(names.contains("DOG"));
  assertTrue(names.contains("CAT"));
  assertTrue(names.contains("S1"));
  names = c.getNames("D");
  assertEquals(1, names.size());
  assertTrue(names.contains("DOG"));
  names = c.getNames("d");
  assertEquals(1, names.size());
  assertTrue(names.contains("DOG"));
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Return all names of the group of constants for the
 * given bean property name.
 * @param propertyName the name of the bean property
 * @return the set of values
 * @see #propertyToConstantNamePrefix
 */
public Set<String> getNamesForProperty(String propertyName) {
  return getNames(propertyToConstantNamePrefix(propertyName));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core

/**
 * Return all names of the group of constants for the
 * given bean property name.
 * @param propertyName the name of the bean property
 * @return the set of values
 * @see #propertyToConstantNamePrefix
 */
public Set<String> getNamesForProperty(String propertyName) {
  return getNames(propertyToConstantNamePrefix(propertyName));
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Return all names of the group of constants for the
 * given bean property name.
 * @param propertyName the name of the bean property
 * @return the set of values
 * @see #propertyToConstantNamePrefix
 */
public Set<String> getNamesForProperty(String propertyName) {
  return getNames(propertyToConstantNamePrefix(propertyName));
}

相关文章