Commit 55e2182a authored by Martti Käärik's avatar Martti Käärik
Browse files

Applied GeneratedCodeApi annotations

parent 94579594
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import org.etsi.mts.tdl.execution.java.tri.Reporter;
 * properties reported at completion describe its outcome. A property is only
 * present if applicable to the kind of behaviour and known at the time.
 */
@GeneratedCodeApi
public final class BehaviourProperties {

	private BehaviourProperties() {
@@ -29,6 +30,7 @@ public final class BehaviourProperties {
	 * Builds a property map from alternating keys and values, <b>null</b> values
	 * are allowed and insertion order is kept.
	 */
	@GeneratedCodeApi
	public static Map<String, Object> of(Object... keyValues) {
		if (keyValues == null || keyValues.length == 0)
			return Collections.emptyMap();
@@ -43,38 +45,43 @@ public final class BehaviourProperties {
		return Collections.unmodifiableMap(properties);
	}

	// ---- Any behaviour (start)
	// Any behaviour (start)

	/**
	 * Location of the behaviour in the TDL source, as <code>path:line</code>.
	 * Reported if source traces are enabled in the code generator.
	 */
	@GeneratedCodeApi
	public static final String SOURCE = "source";


	// ---- Assertion (completion)
	// Assertion (completion)

	/**
	 * {@link Boolean}: whether the condition evaluated to true.
	 */
	@GeneratedCodeApi
	public static final String RESULT = "result";

	/**
	 * {@link String}: name of the top-level operator of the condition (e.g.
	 * <code>==</code>), if the condition is an operator application.
	 */
	@GeneratedCodeApi
	public static final String OPERATOR = "operator";

	/**
	 * <code>Object[]</code>: the evaluated operands of the top-level operator, in
	 * order; reported together with {@link #OPERATOR}.
	 */
	@GeneratedCodeApi
	public static final String OPERANDS = "operands";

	/**
	 * The evaluated value of the condition, if it is not an operator application
	 * (otherwise see {@link #OPERATOR}/{@link #OPERANDS}).
	 */
	@GeneratedCodeApi
	public static final String VALUE = "value";

}
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ public class BreakException extends Exception {
		super("Break " + blockQName);
		this.blockName = blockQName;
	}
	@GeneratedCodeApi
	public String getBlockName() {
		return blockName;
	}
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import java.util.concurrent.Executors;
public class ComponentExecutor {
	private Set<TestComponentTest> tests = new HashSet<ComponentExecutor.TestComponentTest>();

	@GeneratedCodeApi
	public void addTest(TestControl control, Runnable test) {
		synchronized (this.tests) {
			this.tests.add(new TestComponentTest(control, test));
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ public class ExceptionalBehaviour {
	/**
	 * The behaviour that is executed when the callable provides a result.
	 */
	@GeneratedCodeApi
	public Behaviour behaviour;
	
	/**
@@ -22,6 +23,7 @@ public class ExceptionalBehaviour {
	/**
	 * Whether the behaviour is an interrupt or default as specified by TDL.
	 */
	@GeneratedCodeApi
	public boolean isInterrupt;

	/**
@@ -44,6 +46,7 @@ public class ExceptionalBehaviour {
		};
	};
	
	@GeneratedCodeApi
	public ExceptionalBehaviour(boolean isInterrupt) {
		this.isInterrupt = isInterrupt;
	}
@@ -51,6 +54,7 @@ public class ExceptionalBehaviour {
	/**
	 * Sets the callable if not set already.
	 */
	@GeneratedCodeApi
	public void setCallable(ExecutionCallable callable) {
		if (this.callable == null)
			this.callable = callable;
+9 −0
Original line number Diff line number Diff line
@@ -16,14 +16,17 @@ public class MappingImpl extends ElementImpl implements Mapping, TriImpl<Mapping
	private MappingImpl parentMapping;
	private Map<String, MappingImpl> parameters = new Hashtable<String, MappingImpl>();

	@GeneratedCodeApi
	public MappingImpl() {
	}

	@GeneratedCodeApi
	public MappingImpl(String mappingName, String uri) {
		this.mappingName = mappingName;
		this.uri = uri;
	}

	@GeneratedCodeApi
	public MappingImpl setParent(MappingImpl parent) {
		this.parentMapping = parent;
		return this;
@@ -39,11 +42,13 @@ public class MappingImpl extends ElementImpl implements Mapping, TriImpl<Mapping
		return mappingName;
	}

	@GeneratedCodeApi
	public MappingImpl setIsResource(boolean resource) {
		this.resource = resource;
		return this;
	}

	@GeneratedCodeApi
	public MappingImpl setIsParameter(boolean parameter) {
		this.parameter = parameter;
		return this;
@@ -59,6 +64,7 @@ public class MappingImpl extends ElementImpl implements Mapping, TriImpl<Mapping
		return parameter;
	}

	@GeneratedCodeApi
	public MappingImpl setResource(MappingImpl container) {
		this.container = container;
		return this;
@@ -70,6 +76,7 @@ public class MappingImpl extends ElementImpl implements Mapping, TriImpl<Mapping
	}

	@Override
	@GeneratedCodeApi
	public MappingImpl setParameter(String name, MappingImpl mapping) {
		this.parameters.put(name, mapping);
		return this;
@@ -84,12 +91,14 @@ public class MappingImpl extends ElementImpl implements Mapping, TriImpl<Mapping
	}

	@Override
	@GeneratedCodeApi
	public MappingImpl setName(String name, String qualifiedName) {
		this.name = name;
		return this;
	}
	
	@Override
	@GeneratedCodeApi
	public MappingImpl addAnnotation(String key, String value) {
		super.addAnnotation(key, value);
		return this;
Loading