sm

查看已加载类的方法信息

“Search-Method” 的简写,这个命令能搜索出所有已经加载了 Class 信息的方法信息。

sm 命令只能看到由当前类所声明 (declaring) 的方法,父类则无法看到。

参数说明

参数名称 参数说明
class-pattern 类名表达式匹配
method-pattern 方法名表达式匹配
[d] 展示每个方法的详细信息
[E] 开启正则表达式匹配,默认为通配符匹配

使用参考

  1. $ sm org.apache.catalina.connector.Connector
  2. org.apache.catalina.connector.Connector-><init>
  3. org.apache.catalina.connector.Connector->setProperty
  4. org.apache.catalina.connector.Connector->getProperty
  5. org.apache.catalina.connector.Connector->toString
  6. org.apache.catalina.connector.Connector->resume
  7. org.apache.catalina.connector.Connector->getScheme
  8. org.apache.catalina.connector.Connector->getProtocol
  9. org.apache.catalina.connector.Connector->getPort
  10. org.apache.catalina.connector.Connector->setService
  11. org.apache.catalina.connector.Connector->setPort
  12. org.apache.catalina.connector.Connector->getService
  13. org.apache.catalina.connector.Connector->getAttribute
  14. org.apache.catalina.connector.Connector->setAttribute
  15. org.apache.catalina.connector.Connector->getLocalPort
  16. org.apache.catalina.connector.Connector->pause
  17. org.apache.catalina.connector.Connector->setProtocol
  18. org.apache.catalina.connector.Connector->initInternal
  19. org.apache.catalina.connector.Connector->setSecure
  20. org.apache.catalina.connector.Connector->getSecure
  21. org.apache.catalina.connector.Connector->startInternal
  22. org.apache.catalina.connector.Connector->stopInternal
  23. org.apache.catalina.connector.Connector->setScheme
  24. org.apache.catalina.connector.Connector->createRequest
  25. org.apache.catalina.connector.Connector->getDomainInternal
  26. org.apache.catalina.connector.Connector->getProtocolHandler
  27. org.apache.catalina.connector.Connector->setURIEncoding
  28. org.apache.catalina.connector.Connector->findSslHostConfigs
  29. org.apache.catalina.connector.Connector->destroyInternal
  30. org.apache.catalina.connector.Connector->getObjectNameKeyProperties
  31. org.apache.catalina.connector.Connector->getAllowTrace
  32. org.apache.catalina.connector.Connector->setAllowTrace
  33. org.apache.catalina.connector.Connector->getAsyncTimeout
  34. org.apache.catalina.connector.Connector->setAsyncTimeout
  35. org.apache.catalina.connector.Connector->getEnableLookups
  36. org.apache.catalina.connector.Connector->setEnableLookups
  37. org.apache.catalina.connector.Connector->getMaxCookieCount
  38. ...
  1. $ sm org.apache.catalina.connector.Connector -d
  2. declaring-class org.apache.catalina.connector.Connector
  3. constructor-name <init>
  4. modifier public
  5. annotation
  6. parameters
  7. exceptions
  8.  
  9. declaring-class org.apache.catalina.connector.Connector
  10. constructor-name <init>
  11. modifier public
  12. annotation
  13. parameters java.lang.String
  14. exceptions
  15.  
  16. declaring-class org.apache.catalina.connector.Connector
  17. method-name setProperty
  18. modifier public
  19. annotation
  20. parameters java.lang.String
  21. java.lang.String
  22. return boolean
  23. exceptions
  24. ......

原文: https://alibaba.github.io/arthas/sm.html