Converting FQN to BinaryName and vise versa

Answered

I would like to know if there is a open api to convert a FQN of a class to Java Binary name to do the vise versa

example:

Ljava/util/AbstractList; -> java.util.AbstractList

java.util.AbstractList -> Ljava/util/AbstractList;

I need this conversion to be done on method and field FQN as well.

2 comments
Comment actions Permalink

There is something in com.intellij.psi.util.ClassUtil. What problem are you trying to solve exactly?

1
Comment actions Permalink

I'm trying to implement the following messages to a Language server in IntelliJ which is described in https://github.com/spring-projects/sts4/wiki/Java-Messages

I think the class you mentioned can be used to do what i want. Thanks alot for helping out with this.

0

Please sign in to leave a comment.