com.maxifier.mxcache.impl.instanceprovider.DelegatingProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.impl.instanceprovider;
import com.maxifier.mxcache.InstanceProvider;
/**
* @author Alexander Kochurov ([email protected])
*/
class DelegatingProvider implements Provider {
private final InstanceProvider instanceProvider;
private final Class extends T> cls;
public DelegatingProvider(InstanceProvider instanceProvider, Class extends T> cls) {
this.instanceProvider = instanceProvider;
this.cls = cls;
}
@Override
public T get() {
return instanceProvider.forClass(cls);
}
}