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

com.patternity.core.metamodel.Modifiers 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.core.metamodel;

/**
 * Represents any kind of modifiers, from the programming language (abstract,
 * static, public, private...) or additional from technical aspects (async...)
 * 
 * @author cyrille martraire
 */
public class Modifiers {

	public static final Modifiers SYNC = new Modifiers(false, true);
	public static final Modifiers ASYNC = new Modifiers(true, true);

	public static final Modifiers ABSTRACT = new Modifiers(false, true);
	public static final Modifiers NON_ABSTRACT = new Modifiers(false, false);

	private final boolean isAbstract;
	private final boolean isAsync;

	public Modifiers(boolean isAbstract, boolean isAsync) {
		this.isAbstract = isAbstract;
		this.isAsync = isAsync;
	}

	public boolean isAsync() {
		return isAsync;
	}

	public boolean isAbstract() {
		return isAbstract;
	}

	public String toString() {
		return (isAsync ? "Async" : "") + (isAbstract ? "Abstract" : "");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy