Search in sources :

Example 1 with SmaliModifierListStub

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

the class SmaliModifierList method getAccessFlags.

public int getAccessFlags() {
    SmaliModifierListStub stub = getStub();
    if (stub != null) {
        return stub.getAccessFlags();
    }
    int flags = 0;
    for (PsiElement accessSpec : findChildrenByType(SmaliTokens.ACCESS_SPEC)) {
        AccessFlags flag = AccessFlags.getAccessFlag(accessSpec.getText());
        if (flag != null) {
            flags |= flag.getValue();
        }
    }
    return flags;
}
Also used : SmaliModifierListStub(org.jf.smalidea.psi.stub.SmaliModifierListStub) StubBasedPsiElement(com.intellij.psi.StubBasedPsiElement) PsiElement(com.intellij.psi.PsiElement) AccessFlags(org.jf.dexlib2.AccessFlags)

Aggregations

PsiElement (com.intellij.psi.PsiElement)1 StubBasedPsiElement (com.intellij.psi.StubBasedPsiElement)1 AccessFlags (org.jf.dexlib2.AccessFlags)1 SmaliModifierListStub (org.jf.smalidea.psi.stub.SmaliModifierListStub)1