本文整理汇总了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);
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
示例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);
}
}
}
}