/** * Mutant factory method that will construct new {@link TypeFactory} with * identical settings except for different cache; most likely one with * bigger maximum size. * * @since 2.8 */ public TypeFactory withCache(LRUMap<Object,JavaType> cache) { return new TypeFactory(cache, _parser, _modifiers, _classLoader); }
public TypeFactory withClassLoader(ClassLoader classLoader) { return new TypeFactory(_typeCache, _parser, _modifiers, classLoader); }
public TypeFactory withModifier(TypeModifier mod) { LRUMap<Object,JavaType> typeCache = _typeCache; TypeModifier[] mods; if (mod == null) { // mostly for unit tests mods = null; // 30-Jun-2016, tatu: for some reason expected semantics are to clear cache // in this case; can't recall why, but keeping the same typeCache = null; } else if (_modifiers == null) { mods = new TypeModifier[] { mod }; } else { mods = ArrayBuilders.insertInListNoDup(_modifiers, mod); } return new TypeFactory(typeCache, _parser, mods, _classLoader); }
/** * Mutant factory method that will construct new {@link TypeFactory} with * identical settings except for different cache; most likely one with * bigger maximum size. * * @since 2.8 */ public TypeFactory withCache(LRUMap<Object,JavaType> cache) { return new TypeFactory(cache, _parser, _modifiers, _classLoader); }
/** * Mutant factory method that will construct new {@link TypeFactory} with * identical settings except for different cache; most likely one with * bigger maximum size. * * @since 2.8 */ public TypeFactory withCache(LRUMap<Object,JavaType> cache) { return new TypeFactory(cache, _parser, _modifiers, _classLoader); }
public TypeFactory withClassLoader(ClassLoader classLoader) { return new TypeFactory(_typeCache, _parser, _modifiers, classLoader); }
public TypeFactory withClassLoader(ClassLoader classLoader) { return new TypeFactory(_typeCache, _parser, _modifiers, classLoader); }
public TypeFactory withModifier(TypeModifier mod) { if (mod == null) { // mostly for unit tests return new TypeFactory(_parser, _modifiers); } if (_modifiers == null) { return new TypeFactory(_parser, new TypeModifier[] { mod }); } return new TypeFactory(_parser, ArrayBuilders.insertInListNoDup(_modifiers, mod)); }
public TypeFactory withModifier(TypeModifier mod) { if (mod == null) { // mostly for unit tests return new TypeFactory(_parser, _modifiers); } if (_modifiers == null) { return new TypeFactory(_parser, new TypeModifier[] { mod }); } return new TypeFactory(_parser, ArrayBuilders.insertInListNoDup(_modifiers, mod)); }
new GsonBuilder().registerTypeAdapterFactory(new TypeFactory()).create();
public TypeFactory withModifier(TypeModifier mod) { if (_modifiers == null) { return new TypeFactory(_parser, new TypeModifier[] { mod }); } return new TypeFactory(_parser, ArrayBuilders.insertInListNoDup(_modifiers, mod)); }
public TypeFactory withModifier(TypeModifier mod) { if (_modifiers == null) { return new TypeFactory(_parser, new TypeModifier[] { mod }); } return new TypeFactory(_parser, ArrayBuilders.insertInListNoDup(_modifiers, mod)); }
public TypeFactory withModifier(TypeModifier mod) { LRUMap<Object,JavaType> typeCache = _typeCache; TypeModifier[] mods; if (mod == null) { // mostly for unit tests mods = null; // 30-Jun-2016, tatu: for some reason expected semantics are to clear cache // in this case; can't recall why, but keeping the same typeCache = null; } else if (_modifiers == null) { mods = new TypeModifier[] { mod }; } else { mods = ArrayBuilders.insertInListNoDup(_modifiers, mod); } return new TypeFactory(typeCache, _parser, mods, _classLoader); }
public TypeFactory withModifier(TypeModifier mod) { LRUMap<Object,JavaType> typeCache = _typeCache; TypeModifier[] mods; if (mod == null) { // mostly for unit tests mods = null; // 30-Jun-2016, tatu: for some reason expected semantics are to clear cache // in this case; can't recall why, but keeping the same typeCache = null; } else if (_modifiers == null) { mods = new TypeModifier[] { mod }; } else { mods = ArrayBuilders.insertInListNoDup(_modifiers, mod); } return new TypeFactory(typeCache, _parser, mods, _classLoader); }
protected final static TypeFactory instance = new TypeFactory();
protected final static TypeFactory instance = new TypeFactory();
protected final static TypeFactory instance = new TypeFactory();
protected final static TypeFactory instance = new TypeFactory();