Get qualifiedName from stub in when possible in SmaliClass

This commit is contained in:
Ben Gruver 2014-03-24 22:31:17 -07:00
parent 9a1db48dc5
commit b4b9c6c387

View File

@ -72,19 +72,12 @@ public class SmaliClass extends SmaliStubBasedPsiElement<SmaliClassStub> impleme
return name.substring(lastDot+1); return name.substring(lastDot+1);
} }
@Nullable @Override public SmaliAccessList getAccessFlagsNode() { @Nullable @Override public String getQualifiedName() {
SmaliClassStatement classStatement = findChildByClass(SmaliClassStatement.class); SmaliClassStub stub = getStub();
if (classStatement == null) { if (stub != null) {
return null; return stub.getQualifiedName();
}
return classStatement.getAccessFlagsNode();
}
@Override public boolean hasTypeParameters() {
// TODO: implement generics
return false;
} }
@Nullable @Override public String getQualifiedName() {
SmaliClassStatement classStatement = findChildByClass(SmaliClassStatement.class); SmaliClassStatement classStatement = findChildByClass(SmaliClassStatement.class);
if (classStatement == null) { if (classStatement == null) {
return null; return null;
@ -104,6 +97,18 @@ public class SmaliClass extends SmaliStubBasedPsiElement<SmaliClassStub> impleme
return name.substring(0, lastDot); return name.substring(0, lastDot);
} }
@Nullable @Override public SmaliAccessList getAccessFlagsNode() {
SmaliClassStatement classStatement = findChildByClass(SmaliClassStatement.class);
if (classStatement == null) {
return null;
}
return classStatement.getAccessFlagsNode();
}
@Override public boolean hasTypeParameters() {
// TODO: implement generics
return false;
}
@Override public boolean isInterface() { @Override public boolean isInterface() {
return getModifierList().hasModifierProperty("interface"); return getModifierList().hasModifierProperty("interface");
} }