@Test public void testGetSuperclassWithoutTypeParameters() { ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("com.github.javaparser.ast.CompilationUnit"); assertEquals("com.github.javaparser.ast.Node", compilationUnit.getSuperClass().getQualifiedName()); }
if (!other.isVoid() && this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else { return isAssignableBy(other.asConstraintType().getBound()); } else if (other.isWildcard()) { if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else if (other.asWildcard().isExtends()) {
if (!other.isVoid() && this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else { return isAssignableBy(other.asConstraintType().getBound()); } else if (other.isWildcard()) { if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else if (other.asWildcard().isExtends()) {
if (!other.isVoid() && this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else { return isAssignableBy(other.asConstraintType().getBound()); } else if (other.isWildcard()) { if (this.getQualifiedName().equals(Object.class.getCanonicalName())) { return true; } else if (other.asWildcard().isExtends()) {
@Test public void testGetSuperclassWithTypeParameters() { ReflectionClassDeclaration compilationUnit = (ReflectionClassDeclaration) typeResolver.solveType("com.github.javaparser.ast.body.ConstructorDeclaration"); assertEquals("com.github.javaparser.ast.body.CallableDeclaration", compilationUnit.getSuperClass().getQualifiedName()); assertEquals("com.github.javaparser.ast.body.ConstructorDeclaration", compilationUnit.getSuperClass().typeParametersMap().getValueBySignature("com.github.javaparser.ast.body.CallableDeclaration.T").get().asReferenceType().getQualifiedName()); }