Search in sources :

Example 1 with SmaliMethodPrototypeStub

use of org.jf.smalidea.psi.stub.SmaliMethodPrototypeStub in project smali by JesusFreke.

the class SmaliMethodPrototype method getReturnType.

@Nullable
public PsiType getReturnType() {
    SmaliMethodPrototypeStub stub = getStub();
    if (stub != null) {
        String returnSmaliTypeName = stub.getReturnSmaliTypeName();
        if (returnSmaliTypeName == null) {
            return null;
        }
        return NameUtils.resolveSmaliToPsiType(this, returnSmaliTypeName);
    }
    PsiTypeElement returnTypeElement = getReturnTypeElement();
    if (returnTypeElement == null) {
        return null;
    }
    return returnTypeElement.getType();
}
Also used : SmaliMethodPrototypeStub(org.jf.smalidea.psi.stub.SmaliMethodPrototypeStub) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with SmaliMethodPrototypeStub

use of org.jf.smalidea.psi.stub.SmaliMethodPrototypeStub in project smali by JesusFreke.

the class SmaliMethodPrototypeElementType method createStub.

@Override
public SmaliMethodPrototypeStub createStub(@NotNull SmaliMethodPrototype psi, StubElement parentStub) {
    SmaliTypeElement returnType = psi.getReturnTypeElement();
    String returnSmaliTypeName = null;
    if (returnType != null) {
        returnSmaliTypeName = returnType.getSmaliName();
    }
    return new SmaliMethodPrototypeStub(parentStub, returnSmaliTypeName);
}
Also used : SmaliTypeElement(org.jf.smalidea.psi.impl.SmaliTypeElement) SmaliMethodPrototypeStub(org.jf.smalidea.psi.stub.SmaliMethodPrototypeStub)

Aggregations

SmaliMethodPrototypeStub (org.jf.smalidea.psi.stub.SmaliMethodPrototypeStub)2 Nullable (org.jetbrains.annotations.Nullable)1 SmaliTypeElement (org.jf.smalidea.psi.impl.SmaliTypeElement)1