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

dev.vality.woody.api.proxy.SingleTargetProvider Maven / Gradle / Ivy

There is a newer version: 2.0.8
Show newest version
package dev.vality.woody.api.proxy;

public class SingleTargetProvider implements InvocationTargetProvider {
    private final Class targetType;
    private final T target;

    public SingleTargetProvider(T target) {
        this((Class) target.getClass(), target);
    }

    public SingleTargetProvider(Class targetType, T target) {
        this.targetType = targetType;
        this.target = target;
    }

    @Override
    public Class getTargetType() {
        return targetType;
    }

    @Override
    public T getTarget() {
        return target;
    }

    @Override
    public boolean isSingleTarget() {
        return true;
    }

    @Override
    public void releaseTarget(T target) {

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy