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

org.kohsuke.args4j.spi.AbstractGetter Maven / Gradle / Ivy

There is a newer version: 1.3.10
Show newest version
package org.kohsuke.args4j.spi;

import java.lang.reflect.Field;

/**
 * An abstract Getter is of the type of the underlying bean and is not multivalued
 * 
 * @author Sina Samangooei ([email protected])
 * @author Jonathon Hare ([email protected]) 
 *
 * @param 
 */
public abstract class AbstractGetter implements Getter{
	protected Class type;
	protected Field f;
	protected Object bean;
	private String name;

	/**
	 * @param name 
	 * @param bean
	 * @param f
	 */
	public AbstractGetter(String name, Object bean, Field f) {
		this.type = bean.getClass();
		this.f = f;
		this.bean = bean;
		this.name = name;
	}
	
	@Override
	public String getOptionName() {
		return name;
	}
	
	@Override
	public Class getType() {
		return type;
	}
	
	@Override
	public boolean isMultiValued() {
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy