当前位置: 首页>>代码示例>>Java>>正文


Java ExtendedProperties.getStringArray方法代码示例

本文整理汇总了Java中org.apache.commons.collections.ExtendedProperties.getStringArray方法的典型用法代码示例。如果您正苦于以下问题:Java ExtendedProperties.getStringArray方法的具体用法?Java ExtendedProperties.getStringArray怎么用?Java ExtendedProperties.getStringArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.collections.ExtendedProperties的用法示例。


在下文中一共展示了ExtendedProperties.getStringArray方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deletePreviouslyGeneratedFiles

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void deletePreviouslyGeneratedFiles(ExtendedProperties properties) {
    String[] stringArray;
    Set<String> stringPropertyNames = properties.keySet();
    for (String name : stringPropertyNames) {
        switch (name) {
            case DO_CASCADED_DELETE:
                stringArray = properties.getStringArray(name);
                deletePreviouslyGeneratedFiles(name, stringArray, true);
                break;
            case DO_ISOLATED_DELETE:
                stringArray = properties.getStringArray(name);
                deletePreviouslyGeneratedFiles(name, stringArray, false);
                break;
        }
    }
}
 
开发者ID:proyecto-adalid,项目名称:adalid,代码行数:18,代码来源:Writer.java

示例2: getArguments

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
private static String[] getArguments(Class<?> clazz, ExtendedProperties properties, Level level) {
    if (properties == null) {
        logger.log(level, ARGS_FAILED + "; properties is null");
    } else if (properties.isEmpty()) {
        logger.log(level, ARGS_FAILED + "; properties is empty");
    } else {
        String key = clazz.getName() + ARGS_SUFFIX;
        try {
            String[] strings = properties.getStringArray(key);
            if (strings == null || strings.length == 0) {
                logger.log(level, ARGS_FAILED + "; property " + key + " not found");
            } else {
                return strings;
            }
        } catch (Exception e) {
            logger.log(level, ARGS_FAILED + "; " + key + " not properly defined (" + e + ")");
        }
    }
    return null;
}
 
开发者ID:proyecto-adalid,项目名称:adalid,代码行数:21,代码来源:Utility.java

示例3: init

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
@Override
public void init(ExtendedProperties configuration) {
	String[] all = configuration.getStringArray(IncludeKey);
	include = new HashSet<String>();
	match = new HashSet<String>();
	if (all != null) {
		for (String s : all) {
			if (s.endsWith("/*")) {
				match.add(s.substring(0, s.length() - 1));
			} else {
				include.add(s);
			}
		}
	}
	if (log.isTraceEnabled()) {
		log.trace("FixedClasspathResourceLoader : initialization complete with include:"
				+ include);
	}
}
 
开发者ID:xiyelife,项目名称:jresplus,代码行数:20,代码来源:FixedClasspathResourceLoader.java

示例4: init

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
/**
 *  This is abstract in the base class, so we need it.
 *  <br>
 *  NOTE: this expects that the ServletContext has already
 *        been placed in the runtime's application attributes
 *        under its full class name (i.e. "javax.servlet.ServletContext").
 *
 * @param configuration the {@link ExtendedProperties} associated with 
 *        this resource loader.
 */
public void init(ExtendedProperties configuration)
{
  paths = configuration.getStringArray("path");
  if (paths == null || paths.length == 0)
  {
    paths = new String[1];
    paths[0] = "/";
  }
  else
  {
    /* make sure the paths end with a '/' */
    for (int i = 0; i < paths.length; i++)
    {
      if (!paths[i].endsWith("/"))
      {
        paths[i] += '/';
      }
    }
  }
  //My_System.variable("paths", paths);
}
 
开发者ID:approvals,项目名称:ApprovalTests.Java,代码行数:32,代码来源:ServletContextLoader.java

示例5: printExtendedProperties

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
public static void printExtendedProperties(ExtendedProperties extendedProperties) {
    ArrayList<String> list = new ArrayList<>();
    for (Iterator i = extendedProperties.getKeys(); i.hasNext();) {
        list.add((String) i.next());
    }
    String[] names = new String[list.size()];
    list.toArray(names);
    Arrays.sort(names);
    String[] values;
    for (String name : names) {
        values = extendedProperties.getStringArray(name);
        logger.trace(name + " = " + (StringUtils.containsIgnoreCase(name, "password") ? "***" : getArrayString(values)));
    }
}
 
开发者ID:proyecto-adalid,项目名称:adalid,代码行数:15,代码来源:PropertiesHandler.java

示例6: createDirectories

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void createDirectories(ExtendedProperties properties) {
    String[] stringArray;
    Set<String> stringPropertyNames = properties.keySet();
    for (String name : stringPropertyNames) {
        switch (name) {
            case DO_CREATE_DIR:
                stringArray = properties.getStringArray(name);
                createDirectories(name, stringArray);
                break;
        }
    }
}
 
开发者ID:proyecto-adalid,项目名称:adalid,代码行数:14,代码来源:Writer.java

示例7: getComparator

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
@SuppressWarnings("unchecked") // unchecked cast
private Comparator<?> getComparator(ExtendedProperties properties, String keyPreffix) {
    String key = keyPreffix + ".comparator";
    String[] classNames = properties.getStringArray(key);
    List<Comparator<?>> comparators = new ArrayList<>();
    Comparator<?> c;
    for (String name : classNames) {
        c = getComparator(name);
        if (c != null) {
            comparators.add(c);
        }
    }
    return comparators.isEmpty() ? null : (Comparator<?>) ComparatorUtils.chainedComparator(comparators); // unchecked cast
}
 
开发者ID:proyecto-adalid,项目名称:adalid,代码行数:15,代码来源:Writer.java

示例8: init

import org.apache.commons.collections.ExtendedProperties; //导入方法依赖的package包/类
/**
 *  This is abstract in the base class, so we need it.
 *  <br>
 *  NOTE: this expects that the ServletContext has already
 *        been placed in the runtime's application attributes
 *        under its full class name (i.e. "javax.servlet.ServletContext").
 *
 * @param configuration the {@link ExtendedProperties} associated with
 *        this resource loader.
 */
public void init(ExtendedProperties configuration)
{
    log.trace("WebappResourceLoader: initialization starting.");

    /* get configured paths */
    paths = configuration.getStringArray("path");
    if (paths == null || paths.length == 0)
    {
        paths = new String[1];
        paths[0] = "/";
    }
    else
    {
        /* make sure the paths end with a '/' */
        for (int i=0; i < paths.length; i++)
        {
            if (!paths[i].endsWith("/"))
            {
                paths[i] += '/';
            }
            log.info("WebappResourceLoader: added template path - '" + paths[i] + "'");
        }
    }

    /* get the ServletContext */
    Object obj = rsvc.getApplicationAttribute(ServletContext.class.getName());
    if (obj instanceof ServletContext)
    {
        servletContext = (ServletContext)obj;
    }
    else
    {
        log.error("WebappResourceLoader: unable to retrieve ServletContext");
    }

    /* init the template paths map */
    templatePaths = new HashMap();

    log.trace("WebappResourceLoader: initialization complete.");
}
 
开发者ID:sabob,项目名称:ratel,代码行数:51,代码来源:WebappResourceLoader.java


注:本文中的org.apache.commons.collections.ExtendedProperties.getStringArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。