tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tools and Libs > Jodd > Utils > How to get current method signature

How to get current method signature 

Jodd is an open-source java library with lot of reusable components and feature rich utilities. This requires the library jodd-3.3.2.jar to be in classpath. The following example shows how to get the signature of current method using RuntimeUtil.currentMethod() API.

File Name  :  
com/bethecoder/tutorials/jodd/utils/RuntimeTest.java 
Author  :  Sudhakar KV
Email  :  [email protected]
   
package com.bethecoder.tutorials.jodd.utils;

import jodd.util.RuntimeUtil;

public class RuntimeTest {

  /**
   @param args
   */
  public static void main(String[] args) {
    System.out.println("Current Mthod : " + RuntimeUtil.currentMethod());
    System.out.println("Available Memory : " + RuntimeUtil.availableMemory() " bytes");
    System.out.println("Available Memory Percent : " + RuntimeUtil.availableMemoryPercent());
  }

}
   

It gives the following output,
Current Mthod : com.bethecoder.tutorials.jodd.utils.RuntimeTest.main(RuntimeTest.java:11)
Available Memory : 66295848 bytes
Available Memory Percent : 99.468475



 
  


  
bl  br