• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java BigIntegerConverter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.commons.beanutils.converters.BigIntegerConverter的典型用法代码示例。如果您正苦于以下问题:Java BigIntegerConverter类的具体用法?Java BigIntegerConverter怎么用?Java BigIntegerConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BigIntegerConverter类属于org.apache.commons.beanutils.converters包,在下文中一共展示了BigIntegerConverter类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: registerConverters

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
public static void registerConverters() {
	ConvertUtils.register(new StringConverter(), String.class);
	//date 
	ConvertUtils.register(new DateConverter(null),java.util.Date.class);
       ConvertUtils.register(new SqlDateConverter(null),java.sql.Date.class);
	ConvertUtils.register(new SqlTimeConverter(null),Time.class);
	ConvertUtils.register(new SqlTimestampConverter(null),Timestamp.class);
	//number
	ConvertUtils.register(new BooleanConverter(null), Boolean.class);
	ConvertUtils.register(new ShortConverter(null), Short.class);
	ConvertUtils.register(new IntegerConverter(null), Integer.class);
	ConvertUtils.register(new LongConverter(null), Long.class);
	ConvertUtils.register(new FloatConverter(null), Float.class);
	ConvertUtils.register(new DoubleConverter(null), Double.class);
	ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class); 
	ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);	
}
 
开发者ID:545473750,项目名称:zswxsqxt,代码行数:18,代码来源:ConvertRegisterHelper.java


示例2: deregister

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * Remove all registered {@link Converter}s, and re-establish the
 * standard Converters.
 */
public void deregister() {

    converters.clear();

    registerPrimitives(false);
    registerStandard(false, false);
    registerOther(true);
    registerArrays(false, 0);
    register(BigDecimal.class, new BigDecimalConverter());
    register(BigInteger.class, new BigIntegerConverter());
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:16,代码来源:ConvertUtilsBean.java


示例3: registerArrays

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * Register array converters.
 *
 * @param throwException <code>true</code> if the converters should
 * throw an exception when a conversion error occurs, otherwise <code>
 * <code>false</code> if a default value should be used.
 * @param defaultArraySize The size of the default array value for array converters
 * (N.B. This values is ignored if <code>throwException</code> is <code>true</code>).
 * Specifying a value less than zero causes a <code>null<code> value to be used for
 * the default.
 */
private void registerArrays(final boolean throwException, final int defaultArraySize) {

    // Primitives
    registerArrayConverter(Boolean.TYPE,   new BooleanConverter(),   throwException, defaultArraySize);
    registerArrayConverter(Byte.TYPE,      new ByteConverter(),      throwException, defaultArraySize);
    registerArrayConverter(Character.TYPE, new CharacterConverter(), throwException, defaultArraySize);
    registerArrayConverter(Double.TYPE,    new DoubleConverter(),    throwException, defaultArraySize);
    registerArrayConverter(Float.TYPE,     new FloatConverter(),     throwException, defaultArraySize);
    registerArrayConverter(Integer.TYPE,   new IntegerConverter(),   throwException, defaultArraySize);
    registerArrayConverter(Long.TYPE,      new LongConverter(),      throwException, defaultArraySize);
    registerArrayConverter(Short.TYPE,     new ShortConverter(),     throwException, defaultArraySize);

    // Standard
    registerArrayConverter(BigDecimal.class, new BigDecimalConverter(), throwException, defaultArraySize);
    registerArrayConverter(BigInteger.class, new BigIntegerConverter(), throwException, defaultArraySize);
    registerArrayConverter(Boolean.class,    new BooleanConverter(),    throwException, defaultArraySize);
    registerArrayConverter(Byte.class,       new ByteConverter(),       throwException, defaultArraySize);
    registerArrayConverter(Character.class,  new CharacterConverter(),  throwException, defaultArraySize);
    registerArrayConverter(Double.class,     new DoubleConverter(),     throwException, defaultArraySize);
    registerArrayConverter(Float.class,      new FloatConverter(),      throwException, defaultArraySize);
    registerArrayConverter(Integer.class,    new IntegerConverter(),    throwException, defaultArraySize);
    registerArrayConverter(Long.class,       new LongConverter(),       throwException, defaultArraySize);
    registerArrayConverter(Short.class,      new ShortConverter(),      throwException, defaultArraySize);
    registerArrayConverter(String.class,     new StringConverter(),     throwException, defaultArraySize);

    // Other
    registerArrayConverter(Class.class,          new ClassConverter(),        throwException, defaultArraySize);
    registerArrayConverter(java.util.Date.class, new DateConverter(),         throwException, defaultArraySize);
    registerArrayConverter(Calendar.class,       new DateConverter(),         throwException, defaultArraySize);
    registerArrayConverter(File.class,           new FileConverter(),         throwException, defaultArraySize);
    registerArrayConverter(java.sql.Date.class,  new SqlDateConverter(),      throwException, defaultArraySize);
    registerArrayConverter(java.sql.Time.class,  new SqlTimeConverter(),      throwException, defaultArraySize);
    registerArrayConverter(Timestamp.class,      new SqlTimestampConverter(), throwException, defaultArraySize);
    registerArrayConverter(URL.class,            new URLConverter(),          throwException, defaultArraySize);

}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:48,代码来源:ConvertUtilsBean.java


示例4: initOther

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * <p>Initialize other global characteristics of the controller servlet.</p>
 *
 * @exception ServletException if we cannot initialize these resources
 */
protected void initOther() throws ServletException {

    String value = null;
    value = getServletConfig().getInitParameter("config");
    if (value != null) {
        config = value;
    }

    // Backwards compatibility for form beans of Java wrapper classes
    // Set to true for strict Struts 1.0 compatibility
    value = getServletConfig().getInitParameter("convertNull");
    if ("true".equalsIgnoreCase(value)
        || "yes".equalsIgnoreCase(value)
        || "on".equalsIgnoreCase(value)
        || "y".equalsIgnoreCase(value)
        || "1".equalsIgnoreCase(value)) {

        convertNull = true;
    }

    if (convertNull) {
        ConvertUtils.deregister();
        ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
        ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);
        ConvertUtils.register(new BooleanConverter(null), Boolean.class);
        ConvertUtils.register(new ByteConverter(null), Byte.class);
        ConvertUtils.register(new CharacterConverter(null), Character.class);
        ConvertUtils.register(new DoubleConverter(null), Double.class);
        ConvertUtils.register(new FloatConverter(null), Float.class);
        ConvertUtils.register(new IntegerConverter(null), Integer.class);
        ConvertUtils.register(new LongConverter(null), Long.class);
        ConvertUtils.register(new ShortConverter(null), Short.class);
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:41,代码来源:ActionServlet.java


示例5: initOther

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * <p>Initialize other global characteristics of the controller
 * servlet.</p>
 *
 * @throws ServletException if we cannot initialize these resources
 */
protected void initOther()
    throws ServletException {
    String value;

    value = getServletConfig().getInitParameter("config");

    if (value != null) {
        config = value;
    }

    // Backwards compatibility for form beans of Java wrapper classes
    // Set to true for strict Struts 1.0 compatibility
    value = getServletConfig().getInitParameter("convertNull");

    if ("true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value)
        || "on".equalsIgnoreCase(value) || "y".equalsIgnoreCase(value)
        || "1".equalsIgnoreCase(value)) {
        convertNull = true;
    }

    if (convertNull) {
        ConvertUtils.deregister();
        ConvertUtils.register(new BigDecimalConverter(null),
            BigDecimal.class);
        ConvertUtils.register(new BigIntegerConverter(null),
            BigInteger.class);
        ConvertUtils.register(new BooleanConverter(null), Boolean.class);
        ConvertUtils.register(new ByteConverter(null), Byte.class);
        ConvertUtils.register(new CharacterConverter(null), Character.class);
        ConvertUtils.register(new DoubleConverter(null), Double.class);
        ConvertUtils.register(new FloatConverter(null), Float.class);
        ConvertUtils.register(new IntegerConverter(null), Integer.class);
        ConvertUtils.register(new LongConverter(null), Long.class);
        ConvertUtils.register(new ShortConverter(null), Short.class);
    }
}
 
开发者ID:SonarSource,项目名称:sonar-scanner-maven,代码行数:43,代码来源:ActionServlet.java


示例6: initOther

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
    * <p>Initialize other global characteristics of the controller servlet.</p>
    * Overridden to remove the ConvertUtils.deregister() command that caused problems
    * with the concurrent data dictionary load.  (KULRNE-4405)
    *
    * @exception ServletException if we cannot initialize these resources
    */
   @Override
protected void initOther() throws ServletException {

       String value = null;
       value = getServletConfig().getInitParameter("config");
       if (value != null) {
           config = value;
       }

       // Backwards compatibility for form beans of Java wrapper classes
       // Set to true for strict Struts 1.0 compatibility
       value = getServletConfig().getInitParameter("convertNull");
       if ("true".equalsIgnoreCase(value)
           || "yes".equalsIgnoreCase(value)
           || "on".equalsIgnoreCase(value)
           || "y".equalsIgnoreCase(value)
           || "1".equalsIgnoreCase(value)) {

           convertNull = true;
       }

       if (convertNull) {
           ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
           ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);
           ConvertUtils.register(new BooleanConverter(null), Boolean.class);
           ConvertUtils.register(new ByteConverter(null), Byte.class);
           ConvertUtils.register(new CharacterConverter(null), Character.class);
           ConvertUtils.register(new DoubleConverter(null), Double.class);
           ConvertUtils.register(new FloatConverter(null), Float.class);
           ConvertUtils.register(new IntegerConverter(null), Integer.class);
           ConvertUtils.register(new LongConverter(null), Long.class);
           ConvertUtils.register(new ShortConverter(null), Short.class);
       }

       // KULRICE-8176: KFS Notes/Attachments Tab Functionality for Note Text Error - Visible/Special characters, spaces, or tabs
       parameterEncoding = getServletConfig().getInitParameter("PARAMETER_ENCODING");
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:45,代码来源:KualiActionServlet.java


示例7: registerStandard

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * Register the converters for standard types.
 * </p>
 * This method registers the following converters:
 * <ul>
 *     <li><code>BigDecimal.class</code> - {@link BigDecimalConverter}</li>
 *     <li><code>BigInteger.class</code> - {@link BigIntegerConverter}</li>
 *     <li><code>Boolean.class</code> - {@link BooleanConverter}</li>
 *     <li><code>Byte.class</code> - {@link ByteConverter}</li>
 *     <li><code>Character.class</code> - {@link CharacterConverter}</li>
 *     <li><code>Double.class</code> - {@link DoubleConverter}</li>
 *     <li><code>Float.class</code> - {@link FloatConverter}</li>
 *     <li><code>Integer.class</code> - {@link IntegerConverter}</li>
 *     <li><code>Long.class</code> - {@link LongConverter}</li>
 *     <li><code>Short.class</code> - {@link ShortConverter}</li>
 *     <li><code>String.class</code> - {@link StringConverter}</li>
 * </ul>
 * @param throwException <code>true</code> if the converters should
 * throw an exception when a conversion error occurs, otherwise <code>
 * <code>false</code> if a default value should be used.
 * @param defaultNull <code>true</code>if the <i>standard</i> converters
 * (see {@link ConvertUtilsBean#registerStandard(boolean, boolean)})
 * should use a default value of <code>null</code>, otherwise <code>false</code>.
 * N.B. This values is ignored if <code>throwException</code> is <code>true</code>
 */
private void registerStandard(final boolean throwException, final boolean defaultNull) {

    final Number     defaultNumber     = defaultNull ? null : ZERO;
    final BigDecimal bigDecDeflt       = defaultNull ? null : new BigDecimal("0.0");
    final BigInteger bigIntDeflt       = defaultNull ? null : new BigInteger("0");
    final Boolean    booleanDefault    = defaultNull ? null : Boolean.FALSE;
    final Character  charDefault       = defaultNull ? null : SPACE;
    final String     stringDefault     = defaultNull ? null : "";

    register(BigDecimal.class, throwException ? new BigDecimalConverter() : new BigDecimalConverter(bigDecDeflt));
    register(BigInteger.class, throwException ? new BigIntegerConverter() : new BigIntegerConverter(bigIntDeflt));
    register(Boolean.class,    throwException ? new BooleanConverter()    : new BooleanConverter(booleanDefault));
    register(Byte.class,       throwException ? new ByteConverter()       : new ByteConverter(defaultNumber));
    register(Character.class,  throwException ? new CharacterConverter()  : new CharacterConverter(charDefault));
    register(Double.class,     throwException ? new DoubleConverter()     : new DoubleConverter(defaultNumber));
    register(Float.class,      throwException ? new FloatConverter()      : new FloatConverter(defaultNumber));
    register(Integer.class,    throwException ? new IntegerConverter()    : new IntegerConverter(defaultNumber));
    register(Long.class,       throwException ? new LongConverter()       : new LongConverter(defaultNumber));
    register(Short.class,      throwException ? new ShortConverter()      : new ShortConverter(defaultNumber));
    register(String.class,     throwException ? new StringConverter()     : new StringConverter(stringDefault));

}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:48,代码来源:ConvertUtilsBean.java


示例8: initOther

import org.apache.commons.beanutils.converters.BigIntegerConverter; //导入依赖的package包/类
/**
 * <p>Initialize other global characteristics of the controller
 * servlet.</p>
 *
 * @throws ServletException if we cannot initialize these resources
 */
protected void initOther()
    throws ServletException {
    String value;

    value = getServletConfig().getInitParameter("config");

    if (value != null) {
        //QB-RM add *.xml
        if(value.trim().length() > 0 && value.indexOf("*.xml") > -1){ //
            String finalValue = "";
            String[] aValue = value.trim().split(",");
            for (int j = 0; j < aValue.length; j++) {
                String path = aValue[j];
                if(path.trim().length() == 0) {
                    continue;
                }
                //判断当前这行是否*.xml
                if(path.trim().endsWith("*.xml")) {
                    File fWarDirStr = RmPathHelper.getWarDir();
                    File fPath = new File(fWarDirStr + File.separator + (path.substring(0, path.length()-"*.xml".length())));
                    for (int i = 0; i < fPath.listFiles().length; i++) {
                        File fPathXml = fPath.listFiles()[i];
                        if(fPathXml.isFile() && fPathXml.toString().toLowerCase().endsWith(".xml")) {
                            String newPath = fPathXml.getAbsolutePath().substring((int)fWarDirStr.getAbsoluteFile().toString().length()).replaceAll("\\\\", "/");
                            finalValue += newPath + ",";
                        }
                    } 
                } else {
                    finalValue += path + ",";
                }
            }
            if(finalValue.endsWith(",")) {
                finalValue = finalValue.substring(0, finalValue.length() - ",".length());
            }
            config = finalValue;
        } else {
            config = value;
        }
    }

    // Backwards compatibility for form beans of Java wrapper classes
    // Set to true for strict Struts 1.0 compatibility
    value = getServletConfig().getInitParameter("convertNull");

    if ("true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value)
        || "on".equalsIgnoreCase(value) || "y".equalsIgnoreCase(value)
        || "1".equalsIgnoreCase(value)) {
        convertNull = true;
    }

    if (convertNull) {
        ConvertUtils.deregister();
        ConvertUtils.register(new BigDecimalConverter(null),
            BigDecimal.class);
        ConvertUtils.register(new BigIntegerConverter(null),
            BigInteger.class);
        ConvertUtils.register(new BooleanConverter(null), Boolean.class);
        ConvertUtils.register(new ByteConverter(null), Byte.class);
        ConvertUtils.register(new CharacterConverter(null), Character.class);
        ConvertUtils.register(new DoubleConverter(null), Double.class);
        ConvertUtils.register(new FloatConverter(null), Float.class);
        ConvertUtils.register(new IntegerConverter(null), Integer.class);
        ConvertUtils.register(new LongConverter(null), Long.class);
        ConvertUtils.register(new ShortConverter(null), Short.class);
    }
}
 
开发者ID:quickbundle,项目名称:qb-core,代码行数:73,代码来源:RmActionServlet.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MockRMWithAMS类代码示例发布时间:2022-05-22
下一篇:
Java Polyline类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap