1. 程式人生 > >存放欄位屬性資訊

存放欄位屬性資訊

package com.opslab.util.bean;

import java.lang.reflect.Method;

/**
* 存放欄位屬性資訊
*/
public class BeanStruct {

//欄位的名字
private String fieldName;
//欄位的型別
private Object fieldType;
//欄位值讀方法
private Method readMethod;
//欄位值寫方法
private Method writeMethod;
private boolean isDeclared;

public BeanStruct(String fieldName, Object fieldType, Method readMethod, Method writeMethod, boolean isDeclared) {
this.fieldName = fieldName;
this.fieldType = fieldType;
this.readMethod = readMethod;
this.writeMethod = writeMethod;
}

public boolean isDeclared() {
return isDeclared;
}

public void setDeclared(boolean isDeclared) {
this.isDeclared = isDeclared;
}

public String getFieldName() {
return fieldName;
}

public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}

public Object getFieldType() {
return fieldType;
}

public void setFieldType(Object fieldType) {
this.fieldType = fieldType;
}

public Method getReadMethod() {
return readMethod;
}

public void setReadMethod(Method readMethod) {
this.readMethod = readMethod;
}

public Method getWriteMethod() {
return writeMethod;
}

public void setWriteMethod(Method writeMethod) {
this.writeMethod = writeMethod;
}
}