Handle external classes with graph #13
-
How is a recommend way to handle external classes in a design language? Can the file be added as attribute to a class and an instance can be asked for the attribute? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, external classes can be added as types of attributes. Therefore, instanced attributes can be stored in the graph and accessed via a graph query. class ClassWithFileAttribute { In the described example, it is a recommend way to handle the external class, but other problems may need other solutions. |
Beta Was this translation helpful? Give feedback.
Yes, external classes can be added as types of attributes. Therefore, instanced attributes can be stored in the graph and accessed via a graph query.
Adding an external class as type is achieved by wrapping the external class in a package (class diagram).
`type File wraps java.io.File
class ClassWithFileAttribute {
file : File
}`
See also the documentation (Language -> Classes Specification -> Datatype).
In the described example, it is a recommend way to handle the external class, but other problems may need other solutions.