Everything You Always Wanted to Know About Java 8

Everything You Always Wanted to Know About Java 8

2 Kommentare zu Everything You Always Wanted to Know About Java 8

Would you like to explore Java structures online? Then you should have a look at our Neo4j demo instance at https://jqassistant.org/demo/java8!

Demo

It gives you access to a Neo4j browser where you can execute your own queries and explore the structures of the Java 8 Runtime Environment as scanned by the jQAssistant Java plugin. Just enter one of the following queries in the top level area and hit Ctrl-Enter:

  • How many types are contained in the Java Runtime Environment?
    MATCH
      (t:Type:File)
    RETURN
      count(t)
    
  • Which class extends from another class?
    MATCH
      (c1:Class)-[:EXTENDS]->(c2:Type)
    RETURN
      c1.fqn, c2.fqn
    LIMIT 20
    
  • Which classes contain the highest number of methods?
    MATCH
      (class:Class)-[:DECLARES]->(method:Method)
    RETURN
      class.fqn, count(method) as Methods
    ORDER BY
      Methods DESC
    LIMIT 20
    
  • Which class has the deepest inheritance hierarchy?
    MATCH
      h=(class:Class)-[:EXTENDS*]->(super:Type)
    RETURN
      class.fqn, length(h) as Depth
    ORDER BY
      Depth desc
    LIMIT 20
    
  • Which classes are affected by IOExceptions?
    	 	 
    MATCH	 	 
     (e:Type)-[:DECLARES]->(init:Constructor)	 	 
    WHERE	 	 
     e.fqn='java.io.IOException'	 	 
    WITH	 	 
     e,init	 	 
    MATCH	 	 
     (type:Type)-[:DECLARES]->(method:Method),	 	 
     path=(method)‐[:INVOKES*]->(init)	 	 
    RETURN	 	 
     e,type,path	 	 
    LIMIT 10	 	 
    

Did you find something interesting? Which query did you use? You’re invited to leave a comment!

About the author:

@dirkmahler

2 Comments

  1. Prav  - 30. April 2018 - 8:23

    How to explore on lambdas and Consumer constructs?

    • Dirk Mahler  - 4. Mai 2018 - 15:45

      The question has been discussed & answered on Stackoverflow, hope it works for you!

Leave a comment

Back to Top