All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.patternity.graphic.behavioral.Invocation Maven / Gradle / Ivy

Go to download

Extensions of the RestFixture. An extension is a RestFixture with some specific/bespoke behaviour not generic enough to make it to the RestFixture itself.

There is a newer version: 3.1
Show newest version
package com.patternity.graphic.behavioral;

/**
 * Represents an invocation of a method or any function, along with its details
 * (return value, sync or async etc.)
 * 
 * @author cyrille martraire
 * @deprecated
 */
public class Invocation {

	private final String method;
	private final String args;
	private final String returnValue;
	private final String kind;
	private final String guard;

	public Invocation(String signature) {
		this(signature, "", null, null, null);
	}

	public Invocation(String method, String args, String returnValue, String kind, String guard) {
		this.method = method;
		this.args = args;
		this.returnValue = returnValue;
		this.kind = kind;
		this.guard = guard;
	}

	public String getSignature() {
		return getMethod() + getArgs();
	}

	public String getArgs() {
		return args;
	}

	public String getMethod() {
		return method;
	}

	public String getReturnValue() {
		return returnValue;
	}

	public String getKind() {
		return kind;
	}

	public boolean isAsync() {
		return kind != null;
	}

	public boolean hasGuard() {
		return guard != null;
	}

	public String getGuard() {
		return guard;
	}

	public String toString() {
		return "Invocation " + getMethod() + "()";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy