public PlaceholderForType(int ordinal) { super(Object.class, TypeBindings.emptyBindings(), TypeFactory.unknownType(), null, 1, // super-class, super-interfaces, hashCode null, null, false); // value/type handler, as-static _ordinal = ordinal; }
/** * Method for constructing a type instance with specified parameterization. *<p> * NOTE: was briefly deprecated for 2.6. */ public JavaType constructSimpleType(Class<?> rawType, JavaType[] parameterTypes) { return _fromClass(null, rawType, TypeBindings.create(rawType, parameterTypes)); }
/** * Method for constructing an {@link ArrayType}. *<p> * NOTE: type modifiers are NOT called on array type itself; but are called * for element type (and other contained types) */ public ArrayType constructArrayType(Class<?> elementType) { return ArrayType.construct(_fromAny(null, elementType, null), null); }
@Override public JavaType resolveType(Type type) { return _typeFactory.constructType(type, _bindings); } }
public JavaType typeFromId(String s) { return TypeFactory.defaultInstance().constructFromCanonical(s); }
/** * Method for constructing a {@link CollectionLikeType}. *<p> * NOTE: type modifiers are NOT called on constructed type itself; but are called * for contained types. */ public CollectionLikeType constructCollectionLikeType(Class<?> collectionClass, JavaType elementType) { JavaType type = _fromClass(null, collectionClass, TypeBindings.createIfNeeded(collectionClass, elementType)); if (type instanceof CollectionLikeType) { return (CollectionLikeType) type; } return CollectionLikeType.upgradeFrom(type, elementType); }
@Override public CollectionLikeType withTypeHandler(Object h) { return new CollectionLikeType(_class, _bindings, _superClass, _superInterfaces, _elementType, _valueHandler, h, _asStatic); }
@Override public CollectionType withTypeHandler(Object h) { return new CollectionType(_class, _bindings, _superClass, _superInterfaces, _elementType, _valueHandler, h, _asStatic); }
@Override public JavaType withContentType(JavaType contentType) { if (_valueType == contentType) { return this; } return new MapLikeType(_class, _bindings, _superClass, _superInterfaces, _keyType, contentType, _valueHandler, _typeHandler, _asStatic); }
@Override public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { return new MapType(rawType, bindings, superClass, superInterfaces, _keyType, _valueType, _valueHandler, _typeHandler, _asStatic); }
@Override public ArrayType withTypeHandler(Object h) { if (h == _typeHandler) { return this; } return new ArrayType(_componentType, _bindings, _emptyArray, _valueHandler, h, _asStatic); }
@Override public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { return new ReferenceType(rawType, _bindings, superClass, superInterfaces, _referencedType, _anchorType, _valueHandler, _typeHandler, _asStatic); }
/** * @since 2.6 */ public JavaType constructReferenceType(Class<?> rawType, JavaType referredType) { return ReferenceType.construct(rawType, null, // no bindings null, null, // or super-class, interfaces? referredType); }
/** * @return New stack frame, if addition is ok; null if not */ public ClassStack child(Class<?> cls) { return new ClassStack(this, cls); }
/** * @since 2.7 */ public static CollectionLikeType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT) { return new CollectionLikeType(rawType, bindings, superClass, superInts, elemT, null, null, false); }
@Override public MapLikeType withValueHandler(Object h) { return new MapLikeType(_class, _bindings, _superClass, _superInterfaces, _keyType, _valueType, h, _typeHandler, _asStatic); }
/** * @since 2.7 */ public static MapType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType keyT, JavaType valueT) { return new MapType(rawType, bindings, superClass, superInts, keyT, valueT, null, null, false); }
@Override public ArrayType withValueHandler(Object h) { if (h == _valueHandler) { return this; } return new ArrayType(_componentType, _bindings, _emptyArray, h, _typeHandler,_asStatic); }
@Override public ReferenceType withTypeHandler(Object h) { if (h == _typeHandler) { return this; } return new ReferenceType(_class, _bindings, _superClass, _superInterfaces, _referencedType, _anchorType, _valueHandler, h, _asStatic); }
@Override public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { return new CollectionLikeType(rawType, bindings, superClass, superInterfaces, _elementType, _valueHandler, _typeHandler, _asStatic); }