Package org.apdplat.platform.annotation

Examples of org.apdplat.platform.annotation.ModelAttr


        List<String> data = new ArrayList<>();
        //获取所有字段,包括继承的
        List<Field> fields = ReflectionUtils.getDeclaredFields(model);
        for (Field field : fields) {
            if(field.isAnnotationPresent(ModelAttr.class)){
                ModelAttr attr = field.getAnnotation(ModelAttr.class);
                String fieldAttr = attr.value();
                data.add(fieldAttr);
            }
        }
       result.add(data);
       for( T obj : page.getModels()){
View Full Code Here


                if(field.isAnnotationPresent(Lob.class)){
                    LOG.debug("字段["+fieldName+"]为大对象, 在toString()方法中忽略输出");
                    continue;
                }
                if(field.isAnnotationPresent(ModelAttr.class)){
                    ModelAttr attr = field.getAnnotation(ModelAttr.class);
                    fieldAttr = attr.value();
                }else{
                    LOG.debug("字段["+fieldName+"]未加@ModelAttr注解, 在toString()方法中忽略输出");
                    continue;
                }
                //获取字段的值
View Full Code Here

TOP

Related Classes of org.apdplat.platform.annotation.ModelAttr

Copyright © 2018 www.massapicom. 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.