Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Analyzing .java files from shell

I want to write a script that will generate a graph of interfaces, abstract classes and implementation classes.

As far as producing the graph, my intention is to use GraphViz to produce the output, and I'd like to be able to make a directed graph with different node colors for interfaces, abstract classes and implementation classes. Once I am able to scan all the java files, making the graph shouldn't be hard.

In order to accomplish this though, I need to write a bunch of piped grep commands, awk, sed, etc. My question is, is there a utility I can use to scan all java files and give me an output of:

  • Abstract Classes (Mandatory)
  • Implementation Classes (Mandatory)
  • Interfaces (Mandatory)
  • Usages of other classes in file [ie, member variables, etc] (Optional)
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You absolutely do not want to use Bash for this. Java has a specific - and complex - syntax, which will be a nightmare to parse with regular expressions. You should instead look into tools that parse Java's Abstract Syntax Tree, or even just look for existing Java source visualizers - there are a number of them.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!