Lines Matching refs:isAssignableFrom
296 if (left.isAssignableFrom(right)) {
310 if (left.isAssignableFrom(right)) {
578 assertTrue(tokL.isAssignableFrom(List.class));
579 assertTrue(tokL.isAssignableFrom(ArrayList.class));
580 assertFalse(tokL.isAssignableFrom(List[].class));
583 assertTrue(tokN.isAssignableFrom(Number.class));
584 assertTrue(tokN.isAssignableFrom(Integer.class));
588 assertTrue(TypeToken.of(Object.class).isAssignableFrom(
590 assertFalse(TypeToken.of(int.class).isAssignableFrom(
595 assertTrue(new TypeToken<T[]>() {}.isAssignableFrom(new TypeToken<T[]>() {}));
596 assertTrue(new TypeToken<T[]>() {}.isAssignableFrom(new TypeToken<T1[]>() {}));
597 assertFalse(new TypeToken<T[]>() {}.isAssignableFrom(new TypeToken<T[][]>() {}));
602 assertTrue(TypeToken.of(Object[].class).isAssignableFrom(wildcardType));
603 assertTrue(TypeToken.of(Object.class).isAssignableFrom(wildcardType));
604 assertTrue(TypeToken.of(wildcardType).isAssignableFrom(wildcardType));
605 assertFalse(TypeToken.of(int[].class).isAssignableFrom(wildcardType));
611 assertTrue(upperBounded.isAssignableFrom(Object[].class));
612 assertTrue(upperBounded.isAssignableFrom(Object[][].class));
613 assertTrue(upperBounded.isAssignableFrom(String[].class));
614 assertTrue(lowerBounded.isAssignableFrom(Object[].class));
615 assertTrue(lowerBounded.isAssignableFrom(Object.class));
616 assertFalse(lowerBounded.isAssignableFrom(Object[][].class));
617 assertFalse(lowerBounded.isAssignableFrom(String[].class));
622 assertTrue(TypeToken.of(int[].class).isAssignableFrom(wildcardType));
623 assertTrue(TypeToken.of(Object.class).isAssignableFrom(wildcardType));
624 assertTrue(TypeToken.of(wildcardType).isAssignableFrom(wildcardType));
625 assertFalse(TypeToken.of(Object[].class).isAssignableFrom(wildcardType));
631 assertFalse(lowerBounded.isAssignableFrom(upperBounded));
632 assertTrue(lowerBounded.isAssignableFrom(lowerBounded));
633 assertTrue(upperBounded.isAssignableFrom(upperBounded));
634 assertFalse(upperBounded.isAssignableFrom(lowerBounded));
638 assertTrue(TypeToken.of(Object[].class).isAssignableFrom(new TypeToken<T[]>() {}));
639 assertTrue(TypeToken.of(Object[].class).isAssignableFrom(new TypeToken<T[][]>() {}));
640 assertTrue(TypeToken.of(Object[][].class).isAssignableFrom(new TypeToken<T[][]>() {}));
646 assertTrue(tokL.isAssignableFrom(StringList.class));
647 assertTrue(tokL.isAssignableFrom(
652 assertTrue(tokS.isAssignableFrom(Second.class));
653 assertTrue(tokS.isAssignableFrom(Third.class.getGenericSuperclass()));
659 assertTrue(tokL.isAssignableFrom(List[].class));
660 assertFalse(tokL.isAssignableFrom(List.class));
664 assertTrue(tokS.isAssignableFrom(Second[].class));
665 assertTrue(tokS.isAssignableFrom(Third[].class));
671 assertTrue(tokL.isAssignableFrom(new TypeToken<List>() {}));
672 assertTrue(tokL.isAssignableFrom(new TypeToken<List<String>>() {}));
673 assertTrue(tokL.isAssignableFrom(new TypeToken<List<?>>() {}));
676 assertTrue(tokS.isAssignableFrom(new TypeToken<Second>() {}));
677 assertTrue(tokS.isAssignableFrom(new TypeToken<Third>() {}));
678 assertTrue(tokS.isAssignableFrom(
682 assertTrue(tokA.isAssignableFrom(new TypeToken<List[]>() {}));
683 assertTrue(tokA.isAssignableFrom(new TypeToken<List<String>[]>() {}));
684 assertTrue(tokA.isAssignableFrom(new TypeToken<List<?>[]>() {}));
689 assertTrue(tokenL.isAssignableFrom(StringList.class));
690 assertFalse(tokenL.isAssignableFrom(List.class));
693 assertTrue(tokenF.isAssignableFrom(ConcreteIS.class));
694 assertFalse(tokenF.isAssignableFrom(ConcreteSI.class));
699 assertTrue(tokenL.isAssignableFrom(StringList[].class));
700 assertFalse(tokenL.isAssignableFrom(List[].class));
705 assertTrue(tokenL.isAssignableFrom(
707 assertFalse(tokenL.isAssignableFrom(
711 assertTrue(tokenF.isAssignableFrom(
713 assertFalse(tokenF.isAssignableFrom(
721 assertTrue(tokL.isAssignableFrom(tokL.getType()));
722 assertTrue(tokL.isAssignableFrom(token.getType()));
727 assertTrue(tokenL.isAssignableFrom(new TypeToken<List<String>>() {}));
728 assertTrue(tokenL.isAssignableFrom(new TypeToken<ArrayList<String>>() {}));
729 assertTrue(tokenL.isAssignableFrom(new TypeToken<StringList>() {}));
732 assertTrue(tokenF.isAssignableFrom(new TypeToken<Second<String>>() {}));
733 assertTrue(tokenF.isAssignableFrom(
735 assertFalse(tokenF.isAssignableFrom(
737 assertTrue(tokenF.isAssignableFrom(
739 assertFalse(tokenF.isAssignableFrom(
741 assertTrue(tokenF.isAssignableFrom(new TypeToken<ConcreteIS>() {}));
742 assertFalse(tokenF.isAssignableFrom(new TypeToken<ConcreteSI>() {}));
757 assertTrue(typeToken.toString(), unboundedToken.isAssignableFrom(typeToken));
760 assertFalse(upperBoundToken.isAssignableFrom(unboundedToken));
761 assertTrue(upperBoundToken.isAssignableFrom(upperBoundToken));
762 assertFalse(upperBoundToken.isAssignableFrom(lowerBoundToken));
763 assertTrue(upperBoundToken.isAssignableFrom(concreteToken));
764 assertTrue(upperBoundToken.isAssignableFrom(subtypeToken));
765 assertFalse(upperBoundToken.isAssignableFrom(supertypeToken));
767 isAssignableFrom(unboundedToken));
768 assertFalse(lowerBoundToken.isAssignableFrom(upperBoundToken));
769 assertTrue(lowerBoundToken.isAssignableFrom(lowerBoundToken));
770 assertTrue(lowerBoundToken.isAssignableFrom(concreteToken));
771 assertFalse(lowerBoundToken.isAssignableFrom(subtypeToken));
772 assertTrue(lowerBoundToken.isAssignableFrom(supertypeToken));
776 typeToken == concreteToken, concreteToken.isAssignableFrom(typeToken));
781 typeToken == subtypeToken, subtypeToken.isAssignableFrom(typeToken));
786 typeToken == supertypeToken, supertypeToken.isAssignableFrom(typeToken));
1198 parameterType.isAssignableFrom(new TypeToken<List<Integer>>() {}));
1600 return new TypeToken<To>(getClass()) {}.isAssignableFrom(new TypeToken<From>(getClass()) {});
1611 to.isAssignableFrom(from));
1617 to.isAssignableFrom(from));