Language Independent Retrievers
PhysicalFilterName
This retriever only works in the context of a logical model and will return the physical architecture filter name of a component. The component in this case would be a logical element, e.g. a class. The result is the architecture filter name of the physical component containing this element. Using this retriever allows you to mix physical and logical assignment strategies in a logical model.
WorkspaceFilterName
This retriever will return the workspace filter of any component. The workspace filter name is the relative path of the source file containing an element. This can be useful to separate assignment by root directory (e.g. test code versus generated code), since root directories are not part of any architecture filter name.
FileName
This retriever will return the file name of the component including extension. The path is the identifying path relative to the Sonargraph root directory. For external components an absolute path might be returned.
Java Attribute Retrievers
TIP
Java attribute retrievers require a fully qualified type name. The Properties view shows the "Name" property for a selected type and you can copy it from there as the fully qualified type name.
JavaHasAnnotation
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any annotation of a class, its fields and its methods. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
artifact Controller { include "JavaHasAnnotation: org.springframework.stereotype.Component" include "JavaHasAnnotation: **.Component" }
The "include" statement of the this example will match any component with a top-level type that is annotated with "@Component" of the Spring framework. The second statement matches any component with a top-level type having an annotation ending with "Component".
JavaTypeOf
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any direct or indirect super type (class or interface). In a physical model if a Java file has more than one top level type we only consider a Java type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
JavaExtendsClass
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any direct or indirect base class of a class. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
JavaImplementsInterface
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any interface implemented by the class. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
JavaIsInterface
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any interface. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
JavaIsClass
This retriever only works for Java and will match if the pattern matches the fully qualified type name of any class. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
JavaExtendsImplementsInterface
This retriever only works for Java and will match if the pattern matches the fully qualified Java name of any interface implemented by a class or extended by an interface. In a physical model only the Java main type (i.e. the type matching the component's name) is considered. This only works on 'internal' types. Please note that “*” will match anything except dots (".").
JavaHasAnnotationValue
This retriever only works for Java and will match if the pattern matches value of a specific annotation of a class. It has two parameters: the fully qualified Java name of the annotation class and the name of the annotation property to extract. In a physical model if a Java file has more than one top level type we only consider the Java class that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
C# Attribute Retrievers
TIP
C# attribute retrievers require a fully qualified type name. The Properties view shows the "Fully Qualified Type Name" property for a selected type and you can copy it from there.
CSharpTypeOf
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any direct or indirect super type. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
CSharpExtendsClass
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any direct or indirect base class of a class. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
CSharpImplementsInterface
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any interface implemented by the class. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
CSharpIsInterface
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any interface. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
CSharpIsClass
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any class. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
CSharpIsEnum
This retriever only works for C# and will match if the pattern matches the fully qualified type name (namespace plus class name separated by ".") of any enum. In a physical model a C# file will only be considered if it contains a type that has the same name as the file. Please note that "*" will match anything except dots (".") for this retriever.
C/C++ Attribute Retrievers
CppExtendsClass
TIP
This attribute retriever requires a fully qualified type name. The Properties view shows the "Fully Qualified Type Name" property for a selected type and you can copy it from there.
This retriever only works for C++ and will match if the pattern matches the fully qualified type name (namespace plus class name with "." as separator) of any direct or indirect base class of a class. In a physical model a C++ component will only be considered if it contains a type that has the same name as the component. Please note that "*" will match anything except dots (".") for this retriever.
CppHeaderPath
This retriever only works for physical models in C and C++ and will match if the pattern matches the identifying path of the main header file of a component. The main header is the header file that has the name of the component, while the identifying path is the relative path of the header relative to the Sonargraph system directory. Use this retriever if the location of a header file is more relevant for the architecture than the source file location.
TypeScript Attribute Retrievers
TypescriptTypeof
This retriever only works for TypeScript and will match if the pattern matches the fully qualified type name (separated by ".") of any direct or indirect super type. Since TypeScript does not have a logical model, a component (always a source file) contains any type with a base type matching the pattern.
TypescriptExtendsClass
This retriever only works for TypeScript and will match if the pattern matches the fully qualified type name (separated by ".") of any direct or indirect base class of a class. Since TypeScript does not have a logical model, a component (always a source file) contains any type with a base type matching the pattern.
TypescriptImplementsInterface
This retriever only works for TypeScript and will match if the pattern matches the fully qualified type name (separated by ".") of any interface implemented by the class or extended by the interface. Since TypeScript does not have a logical model, a component (always a source file) contains any type with a base type matching the pattern.