org.wildfly.clustering.marshalling.protostream.reflect.UnaryMethodMarshaller Maven / Gradle / Ivy
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.clustering.marshalling.protostream.reflect;
import java.lang.reflect.Method;
import java.util.function.Function;
/**
* Generic marshaller based on a single non-public accessor method.
* @param the marshaller target type
* @param the method accessor result type
* @author Paul Ferraro
*/
public class UnaryMethodMarshaller extends UnaryMemberMarshaller {
public UnaryMethodMarshaller(Class extends T> targetClass, Class fieldClass, Function factory) {
super(targetClass, Reflect::invoke, Reflect::findMethod, fieldClass, factory);
}
}