Class VariableUsageCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.shared.components.VariableUsageCreator
-
public class VariableUsageCreator extends Entity
This class constructs aVariableUsage
. It is used to create the 'VariableUsage' object step-by-step, i.e. 'VariableUsageCreator' objects are of intermediate state.- See Also:
VariableUsage
-
-
Constructor Summary
Constructors Constructor Description VariableUsageCreator()
VariableUsageCreator(String reference)
VariableUsageCreator(String reference, String... innerReferences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.palladiosimulator.pcm.parameter.VariableUsage
build()
Turns the entity in the making into the finished entity.VariableUsageCreator
withName(String name)
Defines the unique name of this current entity.VariableUsageCreator
withNamespaceReference(String reference, String... innerReferences)
Creates aNamespaceReference
and adds it to the 'VariableUsage'.VariableUsageCreator
withVariableCharacterisation(String specificationStochasticExpression, org.palladiosimulator.pcm.parameter.VariableCharacterisationType type)
Creates aVariableCharacterisation
and adds it to the 'VariableUsage'.VariableUsageCreator
withVariableReference(String reference)
Creates aVariableReference
and adds it to the 'VariableUsage'.
-
-
-
Method Detail
-
withName
public VariableUsageCreator withName(String name)
Description copied from class:Entity
Defines 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.
-
withVariableCharacterisation
public VariableUsageCreator withVariableCharacterisation(String specificationStochasticExpression, org.palladiosimulator.pcm.parameter.VariableCharacterisationType type)
Creates aVariableCharacterisation
and adds it to the 'VariableUsage'.Variable characterizations store performance critical meta-information on a variable. For example, if a variable's value is used in a long running loop, the value of the variable is performance critical.
Variable characterizations contain atype
(VariableCharacterisationType
), which tells what kind of meta-information is stored and aPCMRandomVariable
for storing the value of the characterization.The stochastic Expression
specification_stochasticExpression
specifies the value of the characterization as a PCMRandomVariable. Possible values for thetype
are 'STRUCTURE', 'NUMBER_OF_ELEMENTS', 'BYTESIZE', 'TYPE', 'VALUE'.- Parameters:
specificationStochasticExpression
- value of the characterizationtype
- of the characterization- Returns:
- the variable usage in the making
- See Also:
VariableCharacterisation
,VariableUsage
-
withVariableReference
public VariableUsageCreator withVariableReference(String reference)
Creates aVariableReference
and adds it to the 'VariableUsage'. A variable usage can have either a variable reference or a namespace reference that can contain inner references.The
reference
refers to the name of the characterized variable as a namedReference association.
Note that it was an explicit design decision to refer to variable names instead of the actual variables (i.e., by referring to Parameter class).- Parameters:
reference
- the name of the characterized variable- Returns:
- the variable usage in the making
- See Also:
AbstractNamedReference
-
withNamespaceReference
public VariableUsageCreator withNamespaceReference(String reference, String... innerReferences)
Creates aNamespaceReference
and adds it to the 'VariableUsage'. A variable usage can have either a variable reference or a namespace reference that can contain inner references.The
reference
refers to the namespace of the characterized variable. TheinnerReferences
are optional further namespace references, though the last innerRefernce will always be aVariableReference
. Combined they act as a namedReference association.
Note that it was an explicit design decision to refer to variable names instead of the actual variables (i.e., by referring to Parameter class).- Parameters:
reference
- namespace reference of the characterized variableinnerReferences
- further namespace references and a variable reference of the characterized variable- Returns:
- the variable usage in the making
- See Also:
AbstractNamedReference
-
-