com.gregmarut.support.beangenerator.value.Value Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of test-beangen Show documentation
Show all versions of test-beangen Show documentation
Supports unit testing by dynamically creating bean objects and populating their fields to default values.
/*******************************************************************************
*
* Copyright (c) 2015 Greg Marut.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Greg Marut - initial API and implementation
*
******************************************************************************/
package com.gregmarut.support.beangenerator.value;
import java.lang.reflect.Field;
/**
* Adds a layer of abstraction for a value allowing for the customization for how a value is
* retrieved
*
* @author Greg Marut
* @param
*/
public interface Value
{
/**
* Returns the class for this value
*
* @return
*/
Class getType();
/**
* Returns the generated value
*
* @return
*/
T getValue();
/**
* Returns the generated value
*
* @param field
* the field that this value represents
* @return
*/
T getValue(Field field);
}