Class CompositeDataTypeCreator
java.lang.Object
org.palladiosimulator.generator.fluent.shared.structure.Entity
org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
org.palladiosimulator.generator.fluent.repository.structure.types.CompositeDataTypeCreator
This class constructs a
CompositeDataType
. It is used to create the 'CompositeDataType' object
step-by-step, i.e. 'CompositeDataTypeCreator' objects are of intermediate state.- See Also:
-
CompositeDataType
-
Field Summary
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
repository
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.palladiosimulator.pcm.repository.CompositeDataType
build()
Turns the entity in the making into the finished entity.withInnerDeclaration
(String name, Primitive primitive) Adds an inner data type to a composite data type with namename
and of typeprimitive
.withInnerDeclaration
(String name, org.palladiosimulator.pcm.repository.DataType dataType) Adds an inner data type to a composite data type with namename
and of typedataType
.Defines the unique name of this current entity.withParentCompositeDataType
(org.palladiosimulator.pcm.repository.CompositeDataType parent) Addsparent
to the list of parents this composite data type inherits from.
-
Constructor Details
-
CompositeDataTypeCreator
-
-
Method Details
-
withName
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. -
withInnerDeclaration
Adds an inner data type to a composite data type with namename
and of typeprimitive
.This corresponds to the declaration of fields in a Java class. For example
.withInnerDeclaration("age", Primitive.INTEGER)
conforms withpublic int age;
.- Parameters:
name
- for the inner data typeprimitive
- inner data type- Returns:
- this composite data type in the making
- See Also:
-
CompositeDataType
-
withInnerDeclaration
public CompositeDataTypeCreator withInnerDeclaration(String name, org.palladiosimulator.pcm.repository.DataType dataType) Adds an inner data type to a composite data type with namename
and of typedataType
.This corresponds to the declaration of fields in a Java class. For example
.withInnerDeclaration("age", Primitive.INTEGER)
conforms withpublic int age;
.
Non primitive data types can be fetched from the repository using the methodfetchOfDataType(String)
.- Parameters:
name
- for the inner data typedataType
- inner data type- Returns:
- this composite data type in the making
- See Also:
-
FluentRepositoryFactory.fetchOfDataType(String)
CompositeDataType
-
withParentCompositeDataType
public CompositeDataTypeCreator withParentCompositeDataType(org.palladiosimulator.pcm.repository.CompositeDataType parent) Addsparent
to the list of parents this composite data type inherits from.An existing composite data type can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e.
create.fetchOfCompleteComponentType(name)
.- Parameters:
parent
-- Returns:
- this composite data type in the making
- See Also:
-
org.palladiosimulator.generator.fluent.repository.factory.FluentRepositoryFactory#fetchOfComposite
CompositeDataType
-
build
public org.palladiosimulator.pcm.repository.CompositeDataType build()Description copied from class:Entity
Turns the entity in the making into the finished entity.
-