How to get the name of a class without the package?
Posted
by Ola Herrdahl
on Stack Overflow
See other posts from Stack Overflow
or by Ola Herrdahl
Published on 2010-04-22T11:31:13Z
Indexed on
2010/04/22
11:33 UTC
Read the original article
Hit count: 300
java
In C# we have Type.FullName and Type.Name for getting the name of a type (class in this case) with or without the namespace (package in java-world).
What is the java equivalent to Type.Name?
Clearly there must be a better way than using Class.getName() and strip it of the package name manually.
© Stack Overflow or respective owner