mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
minor refactors
This commit is contained in:
@@ -32,13 +32,13 @@ import java.util.Map;
|
||||
/**
|
||||
* @author Rob Austin.
|
||||
*/
|
||||
public class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
|
||||
|
||||
private final Map<K, V> map;
|
||||
final Class mapClazz;
|
||||
private final Class mapClazz;
|
||||
|
||||
public AbstractChronicleMapConverter(@NotNull Map<K, V> map) {
|
||||
AbstractChronicleMapConverter(@NotNull Map<K, V> map) {
|
||||
this.map = map;
|
||||
this.mapClazz = map.getClass();
|
||||
}
|
||||
@@ -111,8 +111,8 @@ public class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
return null;
|
||||
}
|
||||
|
||||
static <E> E deserialize(@NotNull UnmarshallingContext unmarshallingContext,
|
||||
@NotNull HierarchicalStreamReader reader) {
|
||||
private static <E> E deserialize(@NotNull UnmarshallingContext unmarshallingContext,
|
||||
@NotNull HierarchicalStreamReader reader) {
|
||||
|
||||
switch (reader.getNodeName()) {
|
||||
|
||||
@@ -131,7 +131,7 @@ public class AbstractChronicleMapConverter<K, V> implements Converter {
|
||||
return (E) unmarshallingContext.convertAnother(null, forName(reader.getNodeName()));
|
||||
}
|
||||
|
||||
static Class forName(String clazz) {
|
||||
private static Class forName(String clazz) {
|
||||
|
||||
try {
|
||||
return Class.forName(clazz);
|
||||
|
||||
@@ -33,8 +33,8 @@ import java.nio.charset.*;
|
||||
*/
|
||||
public class ByteBufferConverter implements Converter {
|
||||
|
||||
Charset charset = Charset.forName("ISO-8859-1");
|
||||
CharsetDecoder decoder = charset.newDecoder();
|
||||
private final Charset charset = Charset.forName("ISO-8859-1");
|
||||
private final CharsetDecoder decoder = charset.newDecoder();
|
||||
|
||||
@Override
|
||||
public void marshal(Object o, HierarchicalStreamWriter writer, MarshallingContext marshallingContext) {
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -223,7 +222,7 @@ public class DataValueConverter implements Converter {
|
||||
|
||||
}
|
||||
|
||||
private void fillInObject(HierarchicalStreamReader reader, UnmarshallingContext context, Object using) throws IntrospectionException, ClassNotFoundException {
|
||||
private void fillInObject(HierarchicalStreamReader reader, UnmarshallingContext context, Object using) throws ClassNotFoundException {
|
||||
|
||||
while (reader.hasMoreChildren()) {
|
||||
reader.moveDown();
|
||||
@@ -282,9 +281,9 @@ public class DataValueConverter implements Converter {
|
||||
}
|
||||
|
||||
|
||||
static Object toNativeValueObjects(HierarchicalStreamReader reader,
|
||||
final Class aClass,
|
||||
UnmarshallingContext context) {
|
||||
private static Object toNativeValueObjects(HierarchicalStreamReader reader,
|
||||
final Class aClass,
|
||||
UnmarshallingContext context) {
|
||||
|
||||
final Object o = DataValueClasses.newDirectInstance(aClass);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user