io.castled.ObjectRegistry Maven / Gradle / Ivy
package io.castled;
import com.google.inject.Injector;
import com.google.inject.Key;
import lombok.Data;
import lombok.Setter;
@Data
public class ObjectRegistry {
@Setter
private static Injector injector;
public static T getInstance(Class tClass) {
return injector.getInstance(tClass);
}
public static T getInstance(Key key) {
return injector.getInstance(key);
}
}