Posts Tagged ‘ Code Snippet ’
If you have to dive into the java stacktrace, you can use three possible functions to do so. Use a Throwable Create a SecurityManager and get his ClassContext Or do the trick with Reflection API (thanks to Heinz’s advise) Here are the three solutions written down: private String getCallerClassFromThrowable() { Throwable trace = new Throwable(); [ READ MORE ]
The following code-lines will give you the possibility to find the bundle which exports a specific package. Note: It’s not considered that different versions of a bundle may be available. be happy until cancelled, Your Codescale’s public class LookupExportedPackage { /** * Lookup for a bundle which exports the specified * <code>packageName</code>. Else <code>null</code> will [ READ MORE ]
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 2 other followers
Get every new post delivered to your Inbox.