Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for UML Diagrams #4

Closed
lindt opened this issue May 10, 2017 · 4 comments
Closed

Support for UML Diagrams #4

lindt opened this issue May 10, 2017 · 4 comments

Comments

@lindt
Copy link

lindt commented May 10, 2017

it would be neat to support a dependencies.uml.
this file should define the dependencies of the packages.
it could contain "unintented dependencies", but shouldn't.
a project then just should include archunit.jar, and then everybody could be sure, that dependencies.uml reflect the current project.
this way your UML keeps up to date and your depencies are better readable then a fluent api ever could be.

@codecholeric
Copy link
Collaborator

Thanks for the idea, I could imagine this to work well for defining structures in a visually comprehensible way.

Just so I understand correctly, dependencies.uml would be a PlantUML file?
Could you provide an example, how the content of such a file would look and a scenario how classes would violate that?

Are we talking about a component diagram with "package ..." nodes?

I would probably just provide an ArchRule that would parse the UML file and derive predicates and conditions from that, to evaluate against imported classes.

@codecholeric
Copy link
Collaborator

I'm still waiting on additional info about this, how should such a puml file look exactly?

@lindt
Copy link
Author

lindt commented Sep 30, 2017

could have a look at what we did for D.
https://github.com/funkwerk/depend

hope this helps, if not, just ping me.

@codecholeric
Copy link
Collaborator

Ah, okay, I'll have a look at that, thanks 😃

msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Jun 8, 2018
Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Jun 11, 2018
worked on setting up dependencies parser

Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Jul 27, 2018
parses components with name, component, and optional alias
parses dependencies with any length arrow

Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Aug 2, 2018
parses components with name, component, and optional alias
parses dependencies with any length arrow

Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Aug 8, 2018
…s, aliases, dependencies, ...

Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Aug 8, 2018
…pes are validated within the condition part now, since it is more related to ArchUnit's interpretation of PlantUML than PlantUML itself (where identical stereotypes are allowed).

Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Aug 8, 2018
Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
msherman32 pushed a commit to msherman32/ArchUnit that referenced this issue Aug 8, 2018
Issue: TNG#4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
codecholeric added a commit that referenced this issue Aug 15, 2018
Issue: #4
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
codecholeric added a commit that referenced this issue Aug 15, 2018
Issue: #4
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
codecholeric pushed a commit that referenced this issue Feb 21, 2021
…s, aliases, dependencies, ...

Issue: #4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
codecholeric pushed a commit that referenced this issue Feb 21, 2021
…pes are validated within the condition part now, since it is more related to ArchUnit's interpretation of PlantUML than PlantUML itself (where identical stereotypes are allowed).

Issue: #4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
codecholeric pushed a commit that referenced this issue Feb 21, 2021
Issue: #4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
codecholeric pushed a commit that referenced this issue Feb 21, 2021
Issue: #4
Signed-off-by: Michael Sherman <msherman32@gatech.edu>
codecholeric added a commit that referenced this issue Feb 21, 2021
Issue: #4
Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
codecholeric added a commit to crizzis/ArchUnit that referenced this issue Mar 27, 2022
…e three try catch blocks start from a handler label.

At least with my JDK 7 it looks like this:

```
private void method(int, boolean);
    descriptor: (IZ)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=6, args_size=3
         0: new           TNG#3                  // class java/net/Socket
         3: dup
         4: ldc           TNG#4                  // String
         6: iconst_0
         7: invokespecial TNG#5                  // Method java/net/Socket."<init>":(Ljava/lang/String;I)V
        10: astore_3
        11: new           TNG#6                  // class java/io/BufferedReader
        14: dup
        15: aconst_null
        16: invokespecial TNG#7                  // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;)V
        19: astore        4
        21: aload         4
        23: invokevirtual TNG#8                  // Method java/io/BufferedReader.close:()V
        26: return
        27: astore        5
        29: aload         4
        31: invokevirtual TNG#8                  // Method java/io/BufferedReader.close:()V
        34: aload         5
        36: athrow
        37: astore_3
        38: return
      Exception table:
         from    to  target type
            27    29    27   any
             0    26    37   Class java/lang/Exception
            27    37    37   Class java/lang/Exception
```

We can possibly ignore this, since we will drop JDK 7 support soon anyway, but let's maybe ponder about it, why it looks so different. That of the two declared try-catch-blocks only one try catch block is visible is definitely strange (and worse than having 3 try-catch-blocks where one is synthetic). But this example is anyway quite strange, because the bytecode immediately changes e.g. if we remove one of the unused method parameters.

Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants