com.github.nill14.utils.init.impl.EmptyPojoInitializer Maven / Gradle / Ivy
package com.github.nill14.utils.init.impl;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import javax.inject.Provider;
import com.github.nill14.utils.init.api.IPojoInitializer;
public final class EmptyPojoInitializer implements IPojoInitializer {
private static final long serialVersionUID = 2837451571146010916L;
private static final EmptyPojoInitializer> instance = new EmptyPojoInitializer<>();
@SuppressWarnings("unchecked")
public static final IPojoInitializer getInstance() {
return (IPojoInitializer) instance;
}
private EmptyPojoInitializer() {
}
@Override
public void init(Provider> factory, T instance) { }
@Override
public void destroy(Provider> factory, T instance) { }
private void writeObject(ObjectOutputStream stream) throws IOException { }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { }
public Object readResolve() {
return getInstance();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy