Class KindSignatureBuilder
java.lang.Object
org.bigraphs.framework.core.SignatureBuilder<StringTypedName,FiniteOrdinal<Integer>,KindControlBuilder,KindSignatureBuilder>
org.bigraphs.framework.core.impl.signature.KindSignatureBuilder
public class KindSignatureBuilder
extends SignatureBuilder<StringTypedName,FiniteOrdinal<Integer>,KindControlBuilder,KindSignatureBuilder>
Builder for kind signatures.
Typical usage relies on methods such as addControl,
getControl, or addActiveKindSort.
- Author:
- Dominik Grzelak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddActiveKindSort(String control, Collection<String> containingControls) This methods adds a place-sort for the given control.addControl(String name, int arity) addPassiveKindSort(String control) This method adds an empty place-sort for the given control.create()Create the signature with the assigned controls so far.create(EMetaModelData metaModelData) protected KindControlBuilderHook method to be implemented by subclasses for creating the corresponding control builder (i.e., only active or dynamic controls).Creates an empty signature, meaning that the control set is empty.
Needed for the interaction of elementary bigraphs and user-defined bigraphs.protected KindSignatureThis method is not called by the user; it is called bySignatureBuilder.createEmpty().createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls) Create a signature with the given controls.createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts) createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts, EMetaModelData metaModelData) newControl(String name, int arity) Methods inherited from class org.bigraphs.framework.core.SignatureBuilder
add, getControls, newControl, newControl, self
-
Constructor Details
-
KindSignatureBuilder
public KindSignatureBuilder()
-
-
Method Details
-
createControlBuilder
Description copied from class:SignatureBuilderHook method to be implemented by subclasses for creating the corresponding control builder (i.e., only active or dynamic controls).- Specified by:
createControlBuilderin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- the control builder
-
newControl
-
addControl
-
addActiveKindSort
public KindSignatureBuilder addActiveKindSort(String control, Collection<String> containingControls) throws ControlNotExistsException This methods adds a place-sort for the given control. The status of the control is thusactive, i.e., it is an non-atomic control.If this method is called multiple times with the same argument
control, the new valuescontainingControlswill be used to override the existing sorting for the controlcontrol.If this method is called after, for example,
addPassiveKindSort(String), then it will override the previous configuration of being an atomic control.- Parameters:
control- the control to specify the place-sorts forcontainingControls- the controls that can be nested undercontrol- Returns:
- the same instance of the kind signature builder
- Throws:
ControlNotExistsException
-
addPassiveKindSort
This method adds an empty place-sort for the given control. The status of the control is thuspassive, i.e., it is an atomic control.If this method is called after, for example,
addActiveKindSort(String, Collection), then it will override the existing sort and declare the given control aspassive.- Parameters:
control- the control to declare atomic- Returns:
- Throws:
ControlNotExistsException
-
create
Description copied from class:SignatureBuilderCreate the signature with the assigned controls so far.- Overrides:
createin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- a signature
-
create
- Overrides:
createin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder>
-
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls) Description copied from class:SignatureBuilderCreate a signature with the given controls.- Specified by:
createWithin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Parameters:
controls- the controls to use for the signature- Returns:
- a signature with the given controls
-
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts) -
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts, EMetaModelData metaModelData) -
createEmpty
Description copied from class:SignatureBuilderCreates an empty signature, meaning that the control set is empty.
Needed for the interaction of elementary bigraphs and user-defined bigraphs.- Overrides:
createEmptyin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- an empty signature of type <S>.
-
createEmptyStub
Description copied from class:SignatureBuilderThis method is not called by the user; it is called bySignatureBuilder.createEmpty().- Specified by:
createEmptyStubin classSignatureBuilder<StringTypedName,FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder>
-