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

eu.ginere.base.util.descriptor.AbstractClassDescriptor Maven / Gradle / Ivy

There is a newer version: 1.2.3
Show newest version
package eu.ginere.base.util.descriptor;

import java.beans.IntrospectionException;
import java.util.List;

/**
 * Mother class for all de descriptor of classes. A class descriptor contains information about the classes, this information
 * may be the methos attributed, etc ... . It can be bassed on anotation of the classes.
 * 
 * @author ventura
 *
 */
public abstract class AbstractClassDescriptor {

	protected final Class clazz;
	
	public AbstractClassDescriptor(Class clazz) throws IntrospectionException{
		this.clazz=clazz;
	}
	
	protected abstract List getProperties(Class clazz) throws IntrospectionException;

	/**
	 * @return the list
	 */
	public abstract List getList();
	
	public abstract void iterate(T src,Iterator iterator);
	
	/**
	 * Returns the property description of this filed.
	 * If no one null is returned.
	 * 
	 * @param propertyName
	 * @return
	 */
	public abstract InnerPropertyDescriptor get(String propertyName);
	
	public interface Iterator{
		void visit(String name, Object value);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy