checking equality of inner super class against Object Follow
While climbing up the superClasses of an innerClass, I eventually hit "Object".
What should I use for my equality check to know when I've reached the top?
Currently hacking it with
if (innerClass.getSuperClass().getName().equals("Object"))
{
}
Please sign in to leave a comment.
http://stackoverflow.com/questions/2946080/check-if-the-superclass-is-java-lang-object
Actually, I hit "solved" too quickly.
In this case, I am comparing a PsiClass with Object... the linked to answer does not work.
How do I check if my PsiInnerClass' super PsiClass is Object?
getQualifiedName().equals(CommonClassNames.JAVA_LANG_OBJECT)