return rule.spelling;
}
@Override
public Object visit(Rule_classField rule) {
SmaliField field = new SmaliField();
//fill .field data
for(Rule innerRule : rule.rules) {
if(innerRule instanceof Rule_dirField)
continue;
if(innerRule instanceof Rule_padding ||
innerRule instanceof Rule_optPadding)
continue;
if(innerRule instanceof Rule_accessMode) {
if(SmaliClass.K_PRIVATE.equals(innerRule.spelling))
field.setFlagValue(SmaliClass.MASK_ACCESSIBILITY, SmaliClass.PRIVATE);
else if(SmaliClass.K_PROTECTED.equals(innerRule.spelling))
field.setFlagValue(SmaliClass.MASK_ACCESSIBILITY, SmaliClass.PROTECTED);
else if(SmaliClass.K_PUBLIC.equals(innerRule.spelling))
field.setFlagValue(SmaliClass.MASK_ACCESSIBILITY, SmaliClass.PUBLIC);
else if(SmaliClass.K_FINAL.equals(innerRule.spelling))
field.setFlag(SmaliClass.FINAL);
else if(SmaliClass.K_STATIC.equals(innerRule.spelling))
field.setFlag(SmaliClass.STATIC);
} else if(innerRule instanceof Rule_qualifier) {
field.setName(innerRule.spelling);
} else if(innerRule instanceof Rule_type) {
field.setType(innerRule.spelling);
smaliClass.addImport(innerRule.spelling);
} else if(innerRule instanceof Rule_value) {
field.setValue(innerRule.spelling);
}
}
smaliClass.addField(field);
return rule.spelling;