Class OperationSignatureCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
-
- org.palladiosimulator.generator.fluent.repository.structure.interfaces.OperationSignatureCreator
-
public class OperationSignatureCreator extends RepositoryEntity
This class constructs aOperationSignature. It is used to create the 'OperationSignature' object step-by-step, i.e. 'OperationSignatureCreator' objects are of intermediate state.- See Also:
OperationSignature
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
repository
-
-
Constructor Summary
Constructors Constructor Description OperationSignatureCreator(RepositoryCreator repo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.palladiosimulator.pcm.repository.OperationSignaturebuild()Turns the entity in the making into the finished entity.OperationSignatureCreatorwithExceptionType(org.palladiosimulator.pcm.repository.ExceptionType exceptionType)Adds theexceptionTypeto the operation signature's list of possible org.palladiosimulator.generator.fluent.exceptions.OperationSignatureCreatorwithFailureType(Failure failureType)Adds thefailureTypeto the operation signature's list of possible failures.OperationSignatureCreatorwithFailureType(org.palladiosimulator.pcm.reliability.FailureType failureType)Adds thefailureTypeto the operation signature's list of possible failures.OperationSignatureCreatorwithName(String name)Defines the unique name of this current entity.OperationSignatureCreatorwithParameter(String name, Primitive dataType, org.palladiosimulator.pcm.repository.ParameterModifier modifier)Creates aParameterand adds it to the signature's ordered list of parameters.OperationSignatureCreatorwithParameter(String name, org.palladiosimulator.pcm.repository.DataType dataType, org.palladiosimulator.pcm.repository.ParameterModifier modifier)Creates aParameterand adds it to the signature's ordered list of parameters.OperationSignatureCreatorwithReturnType(Primitive returnType)Defines thereturnTypeof the operation signature.OperationSignatureCreatorwithReturnType(org.palladiosimulator.pcm.repository.DataType returnType)Defines thereturnTypeof the operation signature.
-
-
-
Constructor Detail
-
OperationSignatureCreator
public OperationSignatureCreator(RepositoryCreator repo)
-
-
Method Detail
-
withName
public OperationSignatureCreator withName(String name)
Description copied from class:EntityDefines the unique name of this current entity. Once created entities are referenced by this name. Only entities with a unique name can be fetched from the model.
-
withReturnType
public OperationSignatureCreator withReturnType(org.palladiosimulator.pcm.repository.DataType returnType)
Defines thereturnTypeof the operation signature.An existing data type can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e.
create.fetchOfDataType(name).- Parameters:
returnType-- Returns:
- this operation signature in the making
- See Also:
FluentRepositoryFactory.fetchOfDataType(String)
-
withReturnType
public OperationSignatureCreator withReturnType(Primitive returnType)
Defines thereturnTypeof the operation signature.A
Primitivedata type can have the values 'boolean', 'integer', 'string', 'double', 'long', 'char', 'byte'.- Parameters:
returnType-- Returns:
- this operation signature in the making
-
withParameter
public OperationSignatureCreator withParameter(String name, Primitive dataType, org.palladiosimulator.pcm.repository.ParameterModifier modifier)
Creates aParameterand adds it to the signature's ordered list of parameters.Each parameter is a tuple of a
nameand adataType(which is unique across the parameters). Optionally, themodifiers 'in', 'out', and 'inout' (with its OMG IDL semantics) can be used for parameters, e.g.ParameterModifier.IN.A
Primitivedata type can have the values 'boolean', 'integer', 'string', 'double', 'long', 'char', 'byte'.- Parameters:
name-dataType-modifier- may be null- Returns:
- this operation signature in the making
- See Also:
ParameterModifier
-
withParameter
public OperationSignatureCreator withParameter(String name, org.palladiosimulator.pcm.repository.DataType dataType, org.palladiosimulator.pcm.repository.ParameterModifier modifier)
Creates aParameterand adds it to the signature's ordered list of parameters.Each parameter is a tuple of a
nameand adataType(which is unique across the parameters). Optionally, themodifiers 'in', 'out', and 'inout' (with its OMG IDL semantics) can be used for parameters, e.g.ParameterModifier.IN.An existing data type can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e.
create.fetchOfDataType(name).- Parameters:
name-dataType-modifier- may be null- Returns:
- this operation signature in the making
- See Also:
FluentRepositoryFactory.fetchOfDataType(String),ParameterModifier
-
withFailureType
public OperationSignatureCreator withFailureType(org.palladiosimulator.pcm.reliability.FailureType failureType)
Adds thefailureTypeto the operation signature's list of possible failures.Failure types can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e.
create.fetchOfFailureType(name).- Parameters:
failureType-- Returns:
- this operation signature in the making
- See Also:
FluentRepositoryFactory.fetchOfFailureType(String)
-
withFailureType
public OperationSignatureCreator withFailureType(Failure failureType)
Adds thefailureTypeto the operation signature's list of possible failures.A
Failuretype can have the values 'HARDWARE_CPU', 'HARDWARE_HDD', 'HARDWARE_DELAY', 'NETWORK_LAN', 'SOFTWARE'.- Parameters:
failureType-- Returns:
- this operation signature in the making
-
withExceptionType
public OperationSignatureCreator withExceptionType(org.palladiosimulator.pcm.repository.ExceptionType exceptionType)
Adds theexceptionTypeto the operation signature's list of possible org.palladiosimulator.generator.fluent.exceptions.An existing exception type can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e.
create.fetchOfExceptionType(name).- Parameters:
exceptionType-- Returns:
- this operation signature in the making
- See Also:
FluentRepositoryFactory.fetchOfExceptionType(String)
-
-