All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibatis.common.beans.SetFieldInvoker Maven / Gradle / Ivy

There is a newer version: 3.0-beta-10
Show newest version
package com.ibatis.common.beans;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Field;

public class SetFieldInvoker implements Invoker {
  private Field field;
  private String name;

  public SetFieldInvoker(Field field) {
    this.field = field;
    this.name = "(" + field.getName() + ")";
  }

  public Object invoke(Object target, Object[] args) throws IllegalAccessException, InvocationTargetException {
    field.set(target, args[0]);
    return null;
  }

  public String getName() {
    return name;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy