Create an Abstract Syntax Tree


I am trying to create a custom rule for java, which checks if a method is invoked multiple times on an object. My problem is, that I don´t understand the structure of the Abstract Syntax Tree (AST) Sonarqube is building. I want to understand what i get when i call for example the methods symbol(), symbolType() or methodSelect() on my trees.(Compared to an AST, or the ASTView in Eclipse is giving me) Or better: How do I traverse the tree, by calling these methods.
I read that i can use the sslr toolkit to show me the tree, but i do not found any tutorials which would help me to create a tree in eclipse (java).

For example how would i get the information of the package of every “get”-Method of this class. (It should be javax.persistence.criteria.Path)

package com.example.test;

import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Root;

import com.example.test.AbstractRepository;

public class TestClass extends AbstractRepository<TestDbo>
	public void TestMethod()
		CriteriaQuery<TestDbo> query = getCriteriaBuilder().createQuery(TestDbo.class);
		Root<TestDbo> root = query.from(TestDbo.class);
		Path<Object> path = root.get("1").get("3").get("2"); // Noncompliant


I hope i could explain my problem clear enough, if not please ask for further informations.

My version: