Package com.structurizr.model
Class CodeElement
java.lang.Object
com.structurizr.model.CodeElement
Represents a code element, such as a Java class or interface,
that is part of the implementation of a component.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the category of this code element (interface, class, etc).Gets the description of this code element.Gets the programming language of this code element.getName()
Gets the name of this code element.Gets the Java package of this component (i.e.getRole()
Gets the role of this code element; Primary or Supporting.long
getSize()
Gets the size of this code element (e.g.getType()
Gets the type (fully qualified type name) of this code element.getUrl()
Gets the URL where more information about this code element can be found.Gets the visibility of this code element (public, package, etc).int
hashCode()
void
setCategory
(String category) Sets the category of this code element.void
setDescription
(String description) Sets the description of this code element.void
setLanguage
(String language) Sets the programming language of this code element.void
setSize
(long size) Sets the size of this code element.void
Sets the URL where more information about this code element can be found.void
setVisibility
(String visibility) Sets the visibility of this code element.
-
Method Details
-
getRole
Gets the role of this code element; Primary or Supporting.- Returns:
- a CodeElementRole enum
-
getName
Gets the name of this code element.- Returns:
- the name, as a String
-
getType
Gets the type (fully qualified type name) of this code element.- Returns:
- the type, as a String
-
getPackage
Gets the Java package of this component (i.e. the package of the primary code element).- Returns:
- the package name, as a String
-
getDescription
Gets the description of this code element.- Returns:
- the description, as a String
-
setDescription
Sets the description of this code element.- Parameters:
description
- the description, as a String
-
getUrl
Gets the URL where more information about this code element can be found.- Returns:
- the URL as a String, or null if not set
-
setUrl
Sets the URL where more information about this code element can be found.- Parameters:
url
- the URL as a String- Throws:
IllegalArgumentException
- if the URL is not a well-formed URL
-
getLanguage
Gets the programming language of this code element.- Returns:
- the programming language, as a String
-
setLanguage
Sets the programming language of this code element.- Parameters:
language
- the programming language, as a String
-
getCategory
Gets the category of this code element (interface, class, etc).- Returns:
- the category, as a String
-
setCategory
Sets the category of this code element.- Parameters:
category
- the category, as a String
-
getVisibility
Gets the visibility of this code element (public, package, etc).- Returns:
- the visibility, as a String
-
setVisibility
Sets the visibility of this code element.- Parameters:
visibility
- the visibility, as a String
-
getSize
public long getSize()Gets the size of this code element (e.g. the number of lines of code).- Returns:
- the size, as a long
-
setSize
public void setSize(long size) Sets the size of this code element.- Parameters:
size
- the size, as a long
-
equals
-
hashCode
public int hashCode()
-