下面列出了java.beans.Encoder# writeStatement ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@Override
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
super.initialize(type, oldInstance, newInstance, out);
Public<String, String> map = (Public) oldInstance;
for (Entry<String, String> entry : map.getAll()) {
String[] args = {entry.getKey(), entry.getValue()};
out.writeStatement(new Statement(oldInstance, "put", args));
}
}
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) {
super.initialize(type, oldInstance, newInstance, encoder);
DefaultTableModel m = (DefaultTableModel) oldInstance;
for (int row = 0; row < m.getRowCount(); row++) {
for (int col = 0; col < m.getColumnCount(); col++) {
Object[] o = {m.getValueAt(row, col), row, col};
encoder.writeStatement(new Statement(oldInstance, "setValueAt", o));
}
}
}
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) {
super.initialize(type, oldInstance, newInstance, encoder);
DefaultTableModel m = (DefaultTableModel) oldInstance;
for (int row = 0; row < m.getRowCount(); row++) {
for (int col = 0; col < m.getColumnCount(); col++) {
Object[] o = {m.getValueAt(row, col), row, col};
encoder.writeStatement(new Statement(oldInstance, "setValueAt", o));
}
}
}
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) {
super.initialize(type, oldInstance, newInstance, encoder);
DefaultTableColumnModel m = (DefaultTableColumnModel) oldInstance;
for (int col = 0; col < m.getColumnCount(); col++) {
Object[] o = {m.getColumn(col)};
encoder.writeStatement(new Statement(oldInstance, "addColumn", o));
}
}
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
@Override protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder encoder) {
super.initialize(type, oldInstance, newInstance, encoder);
DefaultTableModel m = (DefaultTableModel) oldInstance;
// Vector v = m.getDataVector();
// for (int i = 0; i < m.getRowCount(); i++) {
// encoder.writeStatement(new Statement(oldInstance, "addRow", new Object[] { (Vector) v.get(i) }));
// }
for (int row = 0; row < m.getRowCount(); row++) {
for (int col = 0; col < m.getColumnCount(); col++) {
Object[] o = {m.getValueAt(row, col), row, col};
encoder.writeStatement(new Statement(oldInstance, "setValueAt", o));
}
}
}