@Override public final JavaType findSuperType(Class<?> rawTarget) { if (rawTarget == _class) { return this; } // Check super interfaces first: if (rawTarget.isInterface() && (_superInterfaces != null)) { for (int i = 0, count = _superInterfaces.length; i < count; ++i) { JavaType type = _superInterfaces[i].findSuperType(rawTarget); if (type != null) { return type; } } } // and if not found, super class and its supertypes if (_superClass != null) { JavaType type = _superClass.findSuperType(rawTarget); if (type != null) { return type; } } return null; }
static JavaUtilCollectionsConverter converter(int kind, JavaType concreteType, Class<?> rawSuper) { return new JavaUtilCollectionsConverter(kind, concreteType.findSuperType(rawSuper)); }
protected JavaType _findConverterType(TypeFactory tf) { JavaType thisType = tf.constructType(getClass()); JavaType convType = thisType.findSuperType(Converter.class); if (convType == null || convType.containedTypeCount() < 2) { throw new IllegalStateException("Cannot find OUT type parameter for Converter of type "+getClass().getName()); } return convType; } }
return baseType; JavaType superType = baseType.findSuperType(superClass); if (superType == null) {
/** * Method that is to figure out actual type parameters that given * class binds to generic types defined by given (generic) * interface or class. * This could mean, for example, trying to figure out * key and value types for Map implementations. * * @param type Sub-type (leaf type) that implements <code>expType</code> */ public JavaType[] findTypeParameters(JavaType type, Class<?> expType) { JavaType match = type.findSuperType(expType); if (match == null) { return NO_TYPES; } return match.getBindings().typeParameterArray(); }
JavaType baseWithPlaceholders = tmpSub.findSuperType(baseType.getRawClass()); if (baseWithPlaceholders == null) { // should be found but... throw new IllegalArgumentException(String.format(
JavaType mapEntryType = type.findSuperType(Map.Entry.class);
private JavaType _findDeclared(JavaType subtype, Class<?> target) { JavaType decl = subtype.findSuperType(target); if (decl == null) { // should never happen but throw new IllegalArgumentException("Strange "+target.getName()+" sub-type, "+subtype+", can not find type parameters"); } return decl; } }
JavaType mapEntryType = _beanType.findSuperType(Map.Entry.class);
private JavaType _findDeclared(JavaType subtype, Class<?> target) { JavaType decl = subtype.findSuperType(target); if (decl == null) { // should never happen but throw new IllegalArgumentException("Strange "+target.getName()+" sub-type, "+subtype+", can not find type parameters"); } return decl; } }
@Override public final JavaType findSuperType(Class<?> rawTarget) { if (rawTarget == _class) { return this; } // Check super interfaces first: if (rawTarget.isInterface() && (_superInterfaces != null)) { for (int i = 0, count = _superInterfaces.length; i < count; ++i) { JavaType type = _superInterfaces[i].findSuperType(rawTarget); if (type != null) { return type; } } } // and if not found, super class and its supertypes if (_superClass != null) { JavaType type = _superClass.findSuperType(rawTarget); if (type != null) { return type; } } return null; }
@Override public final JavaType findSuperType(Class<?> rawTarget) { if (rawTarget == _class) { return this; } // Check super interfaces first: if (rawTarget.isInterface() && (_superInterfaces != null)) { for (int i = 0, count = _superInterfaces.length; i < count; ++i) { JavaType type = _superInterfaces[i].findSuperType(rawTarget); if (type != null) { return type; } } } // and if not found, super class and its supertypes if (_superClass != null) { JavaType type = _superClass.findSuperType(rawTarget); if (type != null) { return type; } } return null; }
protected JavaType _findConverterType(TypeFactory tf) { JavaType thisType = tf.constructType(getClass()); JavaType convType = thisType.findSuperType(Converter.class); if (convType == null || convType.containedTypeCount() < 2) { throw new IllegalStateException("Cannot find OUT type parameter for Converter of type "+getClass().getName()); } return convType; } }
static JavaUtilCollectionsConverter converter(int kind, JavaType concreteType, Class<?> rawSuper) { return new JavaUtilCollectionsConverter(kind, concreteType.findSuperType(rawSuper)); }
protected JavaType _findConverterType(TypeFactory tf) { JavaType thisType = tf.constructType(getClass()); JavaType convType = thisType.findSuperType(Converter.class); if (convType == null || convType.containedTypeCount() < 2) { throw new IllegalStateException("Can not find OUT type parameter for Converter of type "+getClass().getName()); } return convType; } }
return baseType; JavaType superType = baseType.findSuperType(superClass); if (superType == null) {
return baseType; JavaType superType = baseType.findSuperType(superClass); if (superType == null) {
/** * Method that is to figure out actual type parameters that given * class binds to generic types defined by given (generic) * interface or class. * This could mean, for example, trying to figure out * key and value types for Map implementations. * * @param type Sub-type (leaf type) that implements <code>expType</code> */ public JavaType[] findTypeParameters(JavaType type, Class<?> expType) { JavaType match = type.findSuperType(expType); if (match == null) { return NO_TYPES; } return match.getBindings().typeParameterArray(); }
/** * Method that is to figure out actual type parameters that given * class binds to generic types defined by given (generic) * interface or class. * This could mean, for example, trying to figure out * key and value types for Map implementations. * * @param type Sub-type (leaf type) that implements <code>expType</code> */ public JavaType[] findTypeParameters(JavaType type, Class<?> expType) { JavaType match = type.findSuperType(expType); if (match == null) { return NO_TYPES; } return match.getBindings().typeParameterArray(); }
JavaType baseWithPlaceholders = tmpSub.findSuperType(baseType.getRawClass()); if (baseWithPlaceholders == null) { // should be found but... throw new IllegalArgumentException(String.format(