Type interface

A Type constrains the values represented by a TypedElement.

Inheritance Hierarchy

Type PackageableElement NamedElement Element

Attributes

NameTypeDescription
appliedStereotypesStereotype [0..*]Indicates which stereotypes from the selected profile (or profiles) are applied to the element. The selected profiles are the profiles that are applied to the containing package. Inherited from Element.
idstring Gets the unique ID of the element. Inherited from Element.
isInferredboolean [1..1]If true, the type was inferred by a tool, for example during data import. An inferred type is never owned by any Package. 
namestring The name of the NamedElement. Inherited from NamedElement.
ownedCommentsComment [0..*]The Comments owned by this Element. Inherited from Element.
ownerElement [0..1]Gets the element that owns this element. Inherited from Element.
packagePackage Gets the package that owns the packageable element. This property is derived. Inherited from PackageableElement.
taggedValuesTaggedValueSpecification [0..*]Contains 0 or more tagged values for the element. Inherited from Element.
visibilityVisibilityKind [0..1]Determines whether and how the NamedElement is visible outside its owning Namespace. Inherited from NamedElement.

Operations

NameReturnsDescription
getFirstCommentBody()

Type.getFirstCommentBody

X

Gets the text contents of the first comment in the element's owned comments, or an empty string if the element has no comments.

Return value
Type: string [1..1]
The body string of the first comment. If the element has no comments, an empty string is returned.
string [1..1]Gets the text contents of the first comment in the element's owned comments, or an empty string if the element has no comments. Inherited from Element.
getNamespaceName(separator)

Type.getNamespaceName

X

Constructs a name from the names of the nesting packages. The name is constructed working inwards from the package that is defined as namespace root up to but not including the PackageableElement itself.

Parameters
NameTypeDescription
separatorstring [0..1]The string to use to separate names. If not specified, a dot "." will be used.
Return value
Type: string 
A single string with all the names separated.
string Constructs a name from the names of the nesting packages. The name is constructed working inwards from the package that is defined as namespace root up to but not including the PackageableElement itself. Inherited from PackageableElement.
getNestingPackages()

Type.getNestingPackages

X

Gets all packages that contain this Package, working inwards from the top Package to the owning package.

Return value
Type: Package [0..*]
A collection of Packages.
Package [0..*]Gets all packages that contain this Package, working inwards from the top Package to the owning package. Inherited from PackageableElement.
getQualifiedName(separator)

Type.getQualifiedName

X

Constructs a name from the PackageableElement and the names of the nesting packages. The name is constructed working inwards from the package that is defined as namespace root up to and including the PackageableElement itself.

Parameters
NameTypeDescription
separatorstring [0..1]The string to use to separate names. If not specified, a dot "." will be used.
Return value
Type: string 
A single string with all the names separated.
string Constructs a name from the PackageableElement and the names of the nesting packages. The name is constructed working inwards from the package that is defined as namespace root up to and including the PackageableElement itself. Inherited from PackageableElement.