Analisando o código Java com Java

É possível analisar algum código Java com um regex?

Então, digamos que eu queira uma lista dosint variáveis ​​a partir disso:

int abc1 = 1;
int abc2 = abc1 + 1;
int abd3 = abc1 + abc2;

E eu quero colocar isso em umArrayList.

Então, algo assim:

private void parse(String s){

    List<List<String>> variables = new ArrayList<List<String>>();

    list.add(new ArrayList<String>);//var type
    list.add(new ArrayList<String>);//var name
    list.add(new ArrayList<String>);//var data

    Pattern p = Pattern.compile();//This is what I want
    Matcher m = p.matcher(s);

    while(m.find()){
        String match = m.group();
        Pattern p2 = Pattern.compile();//Here as well
        Matcher m2 = p.matcher(s);
        while(m2.find()){
            for(int i = 0; i < m.groupCount()){
                //add the variables to the lists
            }
        }
    }
}

O que eu estou perguntando é o que regex poderia lidar com essa tarefa?

A razão de tudo isso é para que o usuário possa ter um pouco de controle sobre o aplicativo usando um pouco de código (um aplicativo Android btw)

Se não é recomendado usar um regex, então qual analisador eu deveria estar usando?

questionAnswers(5)

yourAnswerToTheQuestion