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


Java Utils.getPropertiesWithAnnotation方法代码示例

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


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

示例1: processSingleLabelledCell

import net.java.amateras.xlsbeans.Utils; //导入方法依赖的package包/类
protected void processSingleLabelledCell(WSheet wSheet, Object tableObj, WCell headerCell, AnnotationReader reader,
                                         XLSBeansConfig config, List<NeedPostProcess> needPostProcess) throws Exception {

    List<Object> properties = Utils.getPropertiesWithAnnotation(tableObj, reader, LabelledCell.class);

    LabelledCellProcessor labelledCellProcessor = new LabelledCellProcessor();
    for (Object property : properties) {
        LabelledCell ann = null;
        if(property instanceof Method){
        	ann = reader.getAnnotation(tableObj.getClass(), (Method) property, LabelledCell.class);

        } else if(property instanceof Field){
        	ann = reader.getAnnotation(tableObj.getClass(), (Field) property, LabelledCell.class);
        }

        WCell titleCell = null;
        try {
            titleCell = Utils.getCell(wSheet, ann.label(), headerCell, config);
        } catch (XLSBeansException e) {
            if (ann.optional()) {
                continue;
            } else {
                throw e;
            }
        }

        LabelledCell labelledCell = new LabelledCellForIterateTable(ann, titleCell.getRow(), titleCell.getColumn());

        if(property instanceof Method){
         labelledCellProcessor.doProcess(wSheet, tableObj, (Method) property, labelledCell, reader, config, needPostProcess);

        } else if(property instanceof Field){
         labelledCellProcessor.doProcess(wSheet, tableObj, (Field) property, labelledCell, reader, config, needPostProcess);
        }
    }
}
 
开发者ID:takezoe,项目名称:xlsbeans,代码行数:37,代码来源:IterateTablesProcessor.java

示例2: processMultipleTableCell

import net.java.amateras.xlsbeans.Utils; //导入方法依赖的package包/类
protected void processMultipleTableCell(WSheet wSheet, Object tableObj, WCell headerCell, AnnotationReader reader,
        IterateTables iterateTables, XLSBeansConfig config, List<NeedPostProcess> needPostProcess) throws Exception {

    List<Object> properties = Utils.getPropertiesWithAnnotation(tableObj, reader, HorizontalRecords.class);

    int headerColumn = headerCell.getColumn();
    int headerRow = headerCell.getRow();

    if (iterateTables.bottom() > 0) {
        // if positive value set to bottom(), row index of table header move
        headerRow += iterateTables.bottom();
    }

    HorizontalRecordsProcessor processor = new HorizontalRecordsProcessor();
    for (Object property : properties) {
        HorizontalRecords ann = null;
        if(property instanceof Method){
        	ann = reader.getAnnotation(tableObj.getClass(), (Method) property, HorizontalRecords.class);

        } else if(property instanceof Field){
        	ann = reader.getAnnotation(tableObj.getClass(), (Field) property, HorizontalRecords.class);
        }

        if (iterateTables.tableLabel().equals(ann.tableLabel())) {
        	//
            HorizontalRecords records = new HorizontalRecordsForIterateTable(ann, headerColumn, headerRow);

            // horizontal record-mapping
            if(property instanceof Method){
             processor.doProcess(wSheet, tableObj, (Method) property, records, reader, config, needPostProcess);

            } else if(property instanceof Field){
             processor.doProcess(wSheet, tableObj, (Field) property, records, reader, config, needPostProcess);
            }
        }
    }
}
 
开发者ID:takezoe,项目名称:xlsbeans,代码行数:38,代码来源:IterateTablesProcessor.java

示例3: processMultipleTableCellForVertical

import net.java.amateras.xlsbeans.Utils; //导入方法依赖的package包/类
/**
 * VerticalRecordsのマッピングを行います。
 * @param sheet シート
 * @param tableObj オブジェクト
 * @param headerCell ヘッダセル
 * @param reader リーダ
 * @param iterateTables IterateTablesアノテーションの定義
 * @param needPostProcess プロセッサ
 * @throws Exception 予期しない例外
 */
protected void processMultipleTableCellForVertical(WSheet sheet, Object tableObj, WCell headerCell,
    AnnotationReader reader, IterateTables iterateTables, List<NeedPostProcess> needPostProcess) throws Exception {
    List<Object> properties = Utils.getPropertiesWithAnnotation(tableObj, reader, JxVerticalRecords.class);
    int headerColumn = headerCell.getColumn();
    int headerRow = headerCell.getRow();
    if (iterateTables.bottom() > 0) {
        headerRow += iterateTables.bottom();
    }
    JxVerticalRecordsProcessor processor = new JxVerticalRecordsProcessor();
    for (Object property : properties) {
        JxVerticalRecords ann = null;
        if (property instanceof Method) {
            ann = reader.getAnnotation(tableObj.getClass(), (Method) property, JxVerticalRecords.class);
        } else if (property instanceof Field) {
            ann = reader.getAnnotation(tableObj.getClass(), (Field) property, JxVerticalRecords.class);
        }
        if (ann != null && ann.tableLabel().equals(iterateTables.tableLabel())) {
            JxVerticalRecords records = new JxVerticalRecordsForIterateTable(ann, headerColumn, headerRow);
            if (property instanceof Method) {
                processor.doProcess(sheet, tableObj, (Method) property, records, reader, needPostProcess);
            } else if (property instanceof Field) {
                processor.doProcess(sheet, tableObj, (Field) property, records, reader, needPostProcess);
            }
        }
    }
}
 
开发者ID:ctc-g,项目名称:sinavi-jfw,代码行数:37,代码来源:JxIterateTableProcessor.java

示例4: processSingleLabelledCell

import net.java.amateras.xlsbeans.Utils; //导入方法依赖的package包/类
protected void processSingleLabelledCell(WSheet wSheet, Object tableObj,
        WCell headerCell, AnnotationReader reader,
        List<NeedPostProcess> needPostProcess) throws Exception {

    List<Object> properties = Utils.getPropertiesWithAnnotation(
    		tableObj, reader, LabelledCell.class);

    LabelledCellProcessor labelledCellProcessor = new LabelledCellProcessor();
    for (Object property : properties) {
        LabelledCell ann = null;
        if(property instanceof Method){
        	ann = reader.getAnnotation(
        			tableObj.getClass(), (Method) property, LabelledCell.class);

        } else if(property instanceof Field){
        	ann = reader.getAnnotation(
        			tableObj.getClass(), (Field) property, LabelledCell.class);
        }

        WCell titleCell = null;
        try {
            titleCell = Utils.getCell(wSheet, ann.label(), headerCell);
        } catch (XLSBeansException e) {
            if (ann.optional()) {
                continue;
            } else {
                throw e;
            }
        }

        LabelledCell labelledCell = new LabelledCellForIterateTable(ann,
                titleCell.getRow(), titleCell.getColumn());

        if(property instanceof Method){
         labelledCellProcessor.doProcess(wSheet, tableObj,
         		(Method) property, labelledCell, reader, needPostProcess);

        } else if(property instanceof Field){
         labelledCellProcessor.doProcess(wSheet, tableObj,
         		(Field) property, labelledCell, reader, needPostProcess);
        }
    }
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:44,代码来源:IterateTablesProcessor.java

示例5: processMultipleTableCell

import net.java.amateras.xlsbeans.Utils; //导入方法依赖的package包/类
protected void processMultipleTableCell(WSheet wSheet, Object tableObj,
        WCell headerCell, AnnotationReader reader,
        IterateTables iterateTables,
        List<NeedPostProcess> needPostProcess) throws Exception {

    List<Object> properties = Utils.getPropertiesWithAnnotation(
    		tableObj, reader, HorizontalRecords.class);

    int headerColumn = headerCell.getColumn();
    int headerRow = headerCell.getRow();

    if (iterateTables.bottom() > 0) {
        // if positive value set to bottom(), row index of table header move
        headerRow += iterateTables.bottom();
    }

    HorizontalRecordsProcessor processor = new HorizontalRecordsProcessor();
    for (Object property : properties) {
        HorizontalRecords ann = null;
        if(property instanceof Method){
        	ann = reader.getAnnotation(
        			tableObj.getClass(), (Method) property, HorizontalRecords.class);

        } else if(property instanceof Field){
        	ann = reader.getAnnotation(
        			tableObj.getClass(), (Field) property, HorizontalRecords.class);
        }

        if (iterateTables.tableLabel().equals(ann.tableLabel())) {
        	//
            HorizontalRecords records = new HorizontalRecordsForIterateTable(
                    ann,headerColumn, headerRow);

            // horizontal record-mapping
            if(property instanceof Method){
             processor.doProcess(wSheet, tableObj, (Method) property, records,
                     reader, needPostProcess);

            } else if(property instanceof Field){
             processor.doProcess(wSheet, tableObj, (Field) property, records,
                     reader, needPostProcess);
            }
        }
    }
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:46,代码来源:IterateTablesProcessor.java


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