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

com.talk2object.plum.interaction.view.annotation.parameter.helper.ParameterWrapper Maven / Gradle / Ivy

package com.talk2object.plum.interaction.view.annotation.parameter.helper;

import java.lang.annotation.Annotation;
import java.util.List;

import com.talk2object.plum.interaction.rich.field.InteractiveField;

/**
 * because annotations can not have regular methods. we have to put those logics
 * in Helper classes.
 * 
 * keep it stateless,
 * 
 * @author jack
 *
 */
public interface ParameterWrapper {
	// init
	void setParameter(Annotation parameter);
	void setTargetClass(Class clazz);

	boolean hasOptions();

	/**
	 * init-value and options
	 * 
	 * @return
	 */
	Object value2Object(Object value);

	Object getInitValueAsObject();

	List getOptionAsList();

	/**
	 * extract info from annotation, update Input.
	 * 
	 * @param input
	 */
	void enrich(InteractiveField input);

}