Created
April 16, 2020 13:37
-
-
Save Gydo194/7b0d0f3940da4937dc0943252188381b to your computer and use it in GitHub Desktop.
Java classdiagram helper script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE=$1 | |
#public members | |
printf "\nPUBLIC MEMBERS\n" | |
fgrep 'public' $FILE | fgrep -v '(' | fgrep -v 'class' | awk '{print $3}' | |
#private members | |
printf "\nPRIVATE MEMBERS\n" | |
fgrep 'private' $FILE | fgrep -v '(' | awk '{print $3}' | |
printf "\nPUBLIC FUNCTIONS\n" | |
fgrep 'public' $FILE | egrep -v 'class|get|set|abstract' | awk '{$1=""; print}' | tr -d '{' | sed -e 's/^[ \t]*//' | |
printf "\nPRIVATE FUNCTIONS\n" | |
fgrep 'private' $FILE | egrep -v 'class|get|set|abstract' | fgrep '(' | awk '{$1=""; print}' | tr -d '{' | sed -e 's/^[ \t]*//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment