@Override public SimpleType withValueHandler(Object h) { if (h == _valueHandler) { return this; } return new SimpleType(_class, _bindings, _superClass, _superInterfaces, h, _typeHandler, _asStatic); }
@Override public SimpleType withTypeHandler(Object h) { if (_typeHandler == h) { return this; } return new SimpleType(_class, _bindings, _superClass, _superInterfaces, _valueHandler, h, _asStatic); }
@Override public SimpleType withStaticTyping() { return _asStatic ? this : new SimpleType(_class, _bindings, _superClass, _superInterfaces, _valueHandler, _typeHandler, true); }
/** * Factory method that is to create a new {@link SimpleType} with no * checks whatsoever. Default implementation calls the single argument * constructor of {@link SimpleType}. * * @since 2.7 */ protected JavaType _newSimpleType(Class<?> raw, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { return new SimpleType(raw, bindings, superClass, superInterfaces); }
/** * Method used by core Jackson classes: NOT to be used by application code: * it does NOT properly handle inspection of super-types, so neither parent * Classes nor implemented Interfaces are accessible with resulting type * instance. *<p> * NOTE: public only because it is called by <code>ObjectMapper</code> which is * not in same package */ public static SimpleType constructUnsafe(Class<?> raw) { return new SimpleType(raw, null, // 18-Oct-2015, tatu: Should be ok to omit possible super-types, right? null, null, null, null, false); }
return new SimpleType(subclass, _bindings, this, _superInterfaces, _valueHandler, _typeHandler, _asStatic); return new SimpleType(subclass, _bindings, this, _superInterfaces, _valueHandler, _typeHandler, _asStatic); return new SimpleType(subclass, _bindings, superb, null, _valueHandler, _typeHandler, _asStatic); for (Class<?> iface : nextI) { if (iface == _class) { // directly implemented return new SimpleType(subclass, _bindings, null, new JavaType[] { this }, _valueHandler, _typeHandler, _asStatic); return new SimpleType(subclass, _bindings, null, new JavaType[] { superb }, _valueHandler, _typeHandler, _asStatic);
return new SimpleType(cls, b, _buildSuperClass(cls.getSuperclass(), b), null, null, null, false);
/** * Helper method we need to recursively build skeletal representations * of superclasses. * * @since 2.7 -- remove when not needed (2.8?) */ private static JavaType _buildSuperClass(Class<?> superClass, TypeBindings b) { if (superClass == null) { return null; } if (superClass == Object.class) { return TypeFactory.unknownType(); } JavaType superSuper = _buildSuperClass(superClass.getSuperclass(), b); return new SimpleType(superClass, b, superSuper, null, null, null, false); }
@Override public SimpleType withTypeHandler(Object h) { return new SimpleType(_class, _typeNames, _typeParameters, _valueHandler, h, _asStatic, _typeParametersFor); }
@Override public SimpleType withValueHandler(Object h) { if (h == _valueHandler) { return this; } return new SimpleType(_class, _typeNames, _typeParameters, h, _typeHandler, _asStatic, _typeParametersFor); }
@Override public SimpleType withValueHandler(Object h) { if (h == _valueHandler) { return this; } return new SimpleType(_class, _bindings, _superClass, _superInterfaces, h, _typeHandler, _asStatic); }
@Override protected JavaType _narrow(Class<?> subclass) { // Should we check that there is a sub-class relationship? return new SimpleType(subclass, _typeNames, _typeParameters, _valueHandler, _typeHandler); }
@Override public SimpleType withTypeHandler(Object h) { return new SimpleType(_class, _typeNames, _typeParameters, _valueHandler, h); }
/** * Method used by core Jackson classes: NOT to be used by application code. *<p> * NOTE: public only because it is called by <code>ObjectMapper</code> which is * not in same package */ public static SimpleType constructUnsafe(Class<?> raw) { return new SimpleType(raw, null, null, null, null, false, null); }
@Override public SimpleType withStaticTyping() { return _asStatic ? this : new SimpleType(_class, _bindings, _superClass, _superInterfaces, _valueHandler, _typeHandler, true); }
@Override protected JavaType _narrow(Class<?> subclass) { // Should we check that there is a sub-class relationship? return new SimpleType(subclass, _typeNames, _typeParameters, _valueHandler, _typeHandler, _asStatic, _typeParametersFor); }
@Override public SimpleType withStaticTyping() { return _asStatic ? this : new SimpleType(_class, _bindings, _superClass, _superInterfaces, _valueHandler, _typeHandler, true); }
/** * Method that will force construction of a simple type, without trying to * check for more specialized types. *<p> * NOTE: no type modifiers are called on type either, so calling this method * should only be used if caller really knows what it's doing... */ public JavaType uncheckedSimpleType(Class<?> cls) { return new SimpleType(cls); }
@Override public SimpleType withStaticTyping() { return _asStatic ? this : new SimpleType(_class, _typeNames, _typeParameters, _valueHandler, _typeHandler, _asStatic, _typeParametersFor); }
/** * Factory method that is to create a new {@link SimpleType} with no * checks whatsoever. Default implementation calls the single argument * constructor of {@link SimpleType}. * * @since 2.7 */ protected JavaType _newSimpleType(Class<?> raw, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { return new SimpleType(raw, bindings, superClass, superInterfaces); }