// Path: RecordingLib/src/com/vpedak/testsrecorder/core/Espresso.java
// public class Espresso extends Subject {
// 
//     public void accept(StringBuilder sb, TestGenerator generator){
//         generator.generateSubject(sb, this);
//     }
// }
// 
// Path: RecordingLib/src/com/vpedak/testsrecorder/core/TestGenerator.java
// public interface TestGenerator {
//     String generate(String activityClassName, String testClassName, String packageName, List<RecordingEvent> events);
// 
//     void generateEvent(StringBuilder sb, RecordingEvent event);
// 
//     void generateSubject(StringBuilder sb, Subject subject);
//     void generateSubject(StringBuilder sb, View subject);
//     void generateSubject(StringBuilder sb, DisplayedView subject);
//     void generateSubject(StringBuilder sb, OptionsMenu subject);
//     void generateSubject(StringBuilder sb, MenuItem subject);
//     void generateSubject(StringBuilder sb, ParentView subject);
//     void generateSubject(StringBuilder sb, ParentIdView subject);
//     void generateSubject(StringBuilder sb, Data subject);
//     void generateSubject(StringBuilder sb, Espresso subject);
// 
//     void generateActon(StringBuilder sb, Action action, Subject subject);
//     void generateActon(StringBuilder sb, ClickAction action, Subject subject);
//     void generateActon(StringBuilder sb, LongClickAction action, Subject subject);
//     void generateActon(StringBuilder sb, ReplaceTextAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeUpAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeDownAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeLeftAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeRightAction action, Subject subject);
//     void generateActon(StringBuilder sb, PressBackAction action, Subject subject);
//     void generateActon(StringBuilder sb, ScrollToPositionAction action, Subject subject);
//     void generateActon(StringBuilder sb, SelectViewPagerPageAction action, Subject subject);
//     void generateActon(StringBuilder sb, ScrollToAction action, Subject subject);
// }


import com.vpedak.testsrecorder.core.Espresso;
import com.vpedak.testsrecorder.core.TestGenerator;
package com.vpedak.testsrecorder.core.events;


public abstract class Subject {
    public void accept(StringBuilder sb, TestGenerator generator){
        generator.generateSubject(sb, this);
    }

    @Override
    public String toString() {
        return Subject.toString(this);
    }

    public static String toString(Subject subject) {
        if (subject instanceof View) {
            View view = (View) subject;
            return "view=" + view.getId();
        } else if (subject instanceof MenuItem) {
            MenuItem menuItem = (MenuItem) subject;
            return "menuItem=" + menuItem.getId() + "#" + menuItem.getTitle();
        } else if (subject instanceof ParentView) {
            ParentView parentView = (ParentView) subject;
            return "parentView=" + parentView.getParentId() + "#" + parentView.getChildIndex();
        } else if (subject instanceof ParentIdView) {
            ParentIdView parentView = (ParentIdView) subject;
            return "parentIdView=" + parentView.getParentId() + "#" + parentView.getChildId();
        } else if (subject instanceof OptionsMenu) {
            return "optionsMenu";
// Path: RecordingLib/src/com/vpedak/testsrecorder/core/Espresso.java
// public class Espresso extends Subject {
// 
//     public void accept(StringBuilder sb, TestGenerator generator){
//         generator.generateSubject(sb, this);
//     }
// }
// 
// Path: RecordingLib/src/com/vpedak/testsrecorder/core/TestGenerator.java
// public interface TestGenerator {
//     String generate(String activityClassName, String testClassName, String packageName, List<RecordingEvent> events);
// 
//     void generateEvent(StringBuilder sb, RecordingEvent event);
// 
//     void generateSubject(StringBuilder sb, Subject subject);
//     void generateSubject(StringBuilder sb, View subject);
//     void generateSubject(StringBuilder sb, DisplayedView subject);
//     void generateSubject(StringBuilder sb, OptionsMenu subject);
//     void generateSubject(StringBuilder sb, MenuItem subject);
//     void generateSubject(StringBuilder sb, ParentView subject);
//     void generateSubject(StringBuilder sb, ParentIdView subject);
//     void generateSubject(StringBuilder sb, Data subject);
//     void generateSubject(StringBuilder sb, Espresso subject);
// 
//     void generateActon(StringBuilder sb, Action action, Subject subject);
//     void generateActon(StringBuilder sb, ClickAction action, Subject subject);
//     void generateActon(StringBuilder sb, LongClickAction action, Subject subject);
//     void generateActon(StringBuilder sb, ReplaceTextAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeUpAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeDownAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeLeftAction action, Subject subject);
//     void generateActon(StringBuilder sb, SwipeRightAction action, Subject subject);
//     void generateActon(StringBuilder sb, PressBackAction action, Subject subject);
//     void generateActon(StringBuilder sb, ScrollToPositionAction action, Subject subject);
//     void generateActon(StringBuilder sb, SelectViewPagerPageAction action, Subject subject);
//     void generateActon(StringBuilder sb, ScrollToAction action, Subject subject);
// }


// Path: RecordingLib/src/com/vpedak/testsrecorder/core/events/Subject.java
import com.vpedak.testsrecorder.core.Espresso;
import com.vpedak.testsrecorder.core.TestGenerator;

package com.vpedak.testsrecorder.core.events;


public abstract class Subject {
    public void accept(StringBuilder sb, TestGenerator generator){
        generator.generateSubject(sb, this);
    }

    @Override
    public String toString() {
        return Subject.toString(this);
    }

    public static String toString(Subject subject) {
        if (subject instanceof View) {
            View view = (View) subject;
            return "view=" + view.getId();
        } else if (subject instanceof MenuItem) {
            MenuItem menuItem = (MenuItem) subject;
            return "menuItem=" + menuItem.getId() + "#" + menuItem.getTitle();
        } else if (subject instanceof ParentView) {
            ParentView parentView = (ParentView) subject;
            return "parentView=" + parentView.getParentId() + "#" + parentView.getChildIndex();
        } else if (subject instanceof ParentIdView) {
            ParentIdView parentView = (ParentIdView) subject;
            return "parentIdView=" + parentView.getParentId() + "#" + parentView.getChildId();
        } else if (subject instanceof OptionsMenu) {
            return "optionsMenu";
        } else if (subject instanceof Espresso) {