Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // g100pon #67 実行中のクラス/メソッド名を取得
- def getMyInfo() {
- def the_thisClassName = getClass().getName()
- def the_inThisObject = new Throwable().getStackTrace().findAll {
- the_stackTraceElement ->
- the_thisClassName.equals(the_stackTraceElement.getClassName())
- }
- println "className = "+ the_inThisObject[0].getProperties().className
- println "methodName = "+ the_inThisObject[0].getProperties().methodName
- }
- getMyInfo()
Add Comment
Please, Sign In to add comment