Package cn.com.annotations

Examples of cn.com.annotations.Element.defaultValue()


    public void settingDefaultValue() throws AppException {
        final List<Field> fields = TypeContentRefecter.getAllFields(this.clazz);
        Element element = null;
        for (Field field : fields) {
            element = field.getAnnotation(Element.class);
            if (element != null && !StringUtil.isEmpty(element.defaultValue())) {
                _VALIDATOR.validate(element);
                // 保存元素内容
                elementValue.put(field.getName(), _FORMATTER.converObject(element.format(), element.defaultValue()));

            }
View Full Code Here


        for (Field field : fields) {
            element = field.getAnnotation(Element.class);
            if (element != null && !StringUtil.isEmpty(element.defaultValue())) {
                _VALIDATOR.validate(element);
                // 保存元素内容
                elementValue.put(field.getName(), _FORMATTER.converObject(element.format(), element.defaultValue()));

            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.