Package com.litecoding.smali2java.entity.smali

Examples of com.litecoding.smali2java.entity.smali.SmaliField


    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;
View Full Code Here

TOP

Related Classes of com.litecoding.smali2java.entity.smali.SmaliField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.