Polishing

(cherry picked from commit a2765c0)
This commit is contained in:
Juergen Hoeller
2018-06-11 18:08:39 +02:00
parent 4aafbe5a84
commit 0777a80efe
7 changed files with 20 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,9 +62,9 @@ class TypeHelper {
DeclaredType declaredType = (DeclaredType) type;
Element enclosingElement = declaredType.asElement().getEnclosingElement();
if (enclosingElement != null && enclosingElement instanceof TypeElement) {
return getQualifiedName(enclosingElement) + "$"
+ declaredType.asElement().getSimpleName().toString();
} else {
return getQualifiedName(enclosingElement) + "$" + declaredType.asElement().getSimpleName().toString();
}
else {
return getQualifiedName(declaredType.asElement());
}
}
@@ -85,7 +85,7 @@ class TypeHelper {
public Element getSuperClass(Element element) {
List<? extends TypeMirror> superTypes = this.types.directSupertypes(element.asType());
if (superTypes.isEmpty()) {
return null; // reached java.lang.Object
return null; // reached java.lang.Object
}
return this.types.asElement(superTypes.get(0));
}