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

org.eclipse.yasson.internal.model.GetFromField Maven / Gradle / Ivy

Go to download

Eclipse Yasson. Reference implementation of JSR-367 (JSON-B).

There is a newer version: 3.0.4
Show newest version
package org.eclipse.yasson.internal.model;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

/**
 * Gets value from field.
 *
 * @author Roman Grigoriadi
 */
public class GetFromField extends GetValueCommand {

    private final Field field;

    /**
     * Create instance.
     *
     * @param field not null
     */
    public GetFromField(Field field) {
        this.field = field;
    }

    @Override
    public Object internalGetValue(Object object) throws IllegalAccessException, InvocationTargetException {
        return field.get(object);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy