Lines Matching refs:subType
213 * @param subType the supposed subtype
215 * @return true if subType can be converted by identity conversion, widening primitive conversion, or widening
218 public static boolean isSubtype(final Class<?> subType, final Class<?> superType) {
222 if(superType.isAssignableFrom(subType)) {
235 if(superType.isPrimitive() && subType.isPrimitive()) {
236 return isProperPrimitiveSubtype(subType, superType);
245 * @param subType the supposed subtype
247 * @return true if subType is a proper (not identical to) primitive subtype of the superType
249 private static boolean isProperPrimitiveSubtype(final Class<?> subType, final Class<?> superType) {
250 if(superType == boolean.class || subType == boolean.class) {
253 if(subType == byte.class) {
256 if(subType == char.class) {
259 if(subType == short.class) {
262 if(subType == int.class) {
265 if(subType == long.class) {
268 if(subType == float.class) {
278 * @param subType the supposed subtype
280 * @return true if subType is a proper (not identical to) primitive subtype of the superType that can be represented
283 private static boolean isProperPrimitiveLosslessSubtype(final Class<?> subType, final Class<?> superType) {
284 if(superType == boolean.class || subType == boolean.class) {
287 if(superType == char.class || subType == char.class) {
290 if(subType == byte.class) {
293 if(subType == short.class) {
296 if(subType == int.class) {
299 if(subType == float.class) {