Sha256: 23cf22341dcb6361100085ffacd63404033d76fdde83232b7bf5b912e206633c

Contents?: true

Size: 1.51 KB

Versions: 48

Compression:

Stored size: 1.51 KB

Contents

package sh.calaba.instrumentationbackend;

import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;

import android.os.Looper;
import sh.calaba.instrumentationbackend.actions.Action;




public class Command {
    private String line;
    private String command;
    private String[] arguments;
    
    public void setCommand(String command) {
    	this.command =  command;
    }
    
    public void setArguments(String[] arguments) {
    	this.arguments = arguments;
    }
    
    public String getCommand() {
    	return command;
    }
    
    public String[] getArguments() {
    	return arguments;
    }
    
    public void setLine(String line) {
		this.line = line;
	}

	public String getLine() {
		return line;
	}

	public String toString() {
		return "Command:'Line:" + getLine() + "," + getCommand() + "', arguments:'" + Arrays.toString(getArguments()) + "'";
	}

    public Result execute() {
        final Action action = InstrumentationBackend.actions.lookup(getCommand());
        return action.execute(getArguments());
        /*
        if ( Looper.getMainLooper().getThread() == Thread.currentThread()) {
            return action.execute(getArguments());
        }

        final AtomicReference<Result> result = new AtomicReference<Result>();
        InstrumentationBackend.instrumentation.runOnMainSync(new Runnable() {
            @Override
            public void run() {
                result.set(action.execute(getArguments()));
            }
        });
        return result.get();
*/
    }

}

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
testautoa-0.4.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.9.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.9.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.9.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.9.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre10 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre9 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre8 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre7 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre2 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.7.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
testautoa-0.4.4 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.6 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.5 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
calabash-android-0.4.5.pre1 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
testautoa-0.4.3 test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java