Package soot.tagkit

Examples of soot.tagkit.VisibilityAnnotationTag


    for (SootClass sootClass : classes) {
      //Find fields containing the @Type annotation and add to map
      Collection<SootField> fields = sootClass.getFields();
      for (SootField field : fields) {
        if (field.hasTag("VisibilityAnnotationTag")) {
          VisibilityAnnotationTag vat = (VisibilityAnnotationTag)field.getTag("VisibilityAnnotationTag");
          Automaton automaton = getAutomatonFromTag(vat);
          if (automaton != null) {
            fieldAutomatonMap.put(field, automaton);
          }
        }
        //Remove all tags from field. JSA tags will be added later
        field.removeAllTags();
      }
     
      //Find methods containing @Type or @LoadType annotation and add to map
      Collection<SootMethod> methods = sootClass.getMethods();
      for (SootMethod m : methods) {
        //Find return annotation
        if (isStringType(m.getReturnType())) {
          VisibilityAnnotationTag vat = (VisibilityAnnotationTag)m.getTag("VisibilityAnnotationTag");
          if (vat != null) {
            Automaton automaton = getAutomatonFromTag(vat);
            if (automaton != null) {
                returnAutomatonMap.put(m, automaton);
            }
          }
        }
       
        //Find parameter annotations
        int count = m.getParameterCount();
        for (int i = 0; i<count; i++) {
          if (isStringType(m.getParameterType(i))) {
            VisibilityParameterAnnotationTag vpat = (VisibilityParameterAnnotationTag)m.getTag("VisibilityParameterAnnotationTag");
            if (vpat != null) {
              VisibilityAnnotationTag vat = vpat.getVisibilityAnnotations().get(i);
              Automaton automaton = getAutomatonFromTag(vat);
              if (automaton != null) {
                Map<Integer,Automaton> pMap;
                if (parameterAutomatonMap.containsKey(m)) {
                  pMap = parameterAutomatonMap.get(m);
View Full Code Here

TOP

Related Classes of soot.tagkit.VisibilityAnnotationTag

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.