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

com.github.restup.mapping.fields.WritableField Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package com.github.restup.mapping.fields;

/**
 * A field which is modifiable
 */
public interface WritableField {

    /**
     * Set the the field's value on the instance provided
     *
     * @param instance of the object whose property to set
     * @param value the value to set
     */
    void writeValue(TARGET instance, VALUE value);

    /**
     * @return a new instance of the object containing the field so that it may be populated using
     *         {@link #writeValue(Object, Object)} if needed
     */
    TARGET createDeclaringInstance();

    /**
     * @return an instance of a container object of the field.
     */
    default VALUE createInstance() {
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy