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

com.github.dakusui.logias.lisp.func.java.Set Maven / Gradle / Ivy

package com.github.dakusui.logias.lisp.func.java;

import java.lang.reflect.Field;

import com.github.dakusui.logias.lisp.s.Sexp;


public class Set extends Accessor {

	public Set(boolean b) {
		super(b);
	}

	@Override
	protected Sexp perform(Object target, Field field, Object valueToAssign) {
		try {
			field.set(target, valueToAssign);
		} catch (IllegalArgumentException e) {
			throw new RuntimeException(e);
		} catch (IllegalAccessException e) {
			throw new RuntimeException(e);
		}
		return Sexp.nil;
	}

	@Override
	protected int numParams() {
		return 3;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy