当前位置: 首页 > news >正文

建设网站方式有哪些品牌策划书案例

建设网站方式有哪些,品牌策划书案例,陕西建设银行官网站,黄页88登录适用于非静态方法#xff1a;this.getClass().getName() 适用于静态方法#xff1a;Thread.currentThread().getStackTrace()[1].getClassName() 获取类名#xff1a; 1、在类的实例中可使用this.getClass().getName();但在static method中不能使用该方法#xff1b; 2、在…适用于非静态方法this.getClass().getName() 适用于静态方法Thread.currentThread().getStackTrace()[1].getClassName() 获取类名 1、在类的实例中可使用this.getClass().getName();但在static method中不能使用该方法 2、在static method中使用方法:Thread.currentThread().getStackTrace()[1].getClassName(); 获取方法名Thread.currentThread().getStackTrace()[1].getMethodName(); 获取代码行号Thread.currentThread().getStackTrace()[1].getLineNumber(); Log 代码 System.out.println(Class: this.getClass().getName() method: Thread.currentThread().getStackTrace()[1].getMethodName() line: Thread.currentThread().getStackTrace()[1].getLineNumber()); Below I present you two different ways to get the current Class: Using ThreadUsing getClass() getClass() method present in every Java object. Like here: String clazz  this.getClass().getName(); static method. It wont work. Even the keyword this is meaningless in a static method. Also, the class returned by the above method may actually be a subclass of the class in which the method is defined. This is because subclasses inherit the methods of their parents; and getClass() returns the actual runtime type of the object. To get the actual class in which a method is defined, use the method below also. static method you can instead use the following: String clazz  Thread.currentThread().getStackTrace()[1].getClassName(); Which uses the static methodgetStackTrace() to get the whole stacktrace. This method returns an array, where the first element (index 0) is the getStackTrace() you called and the second element (index 1) is the method your code is in. String method  Thread.currentThread().getStackTrace()[1].getMethodName();
http://www.dnsts.com.cn/news/143448.html

相关文章:

  • 18款禁用网站app入口西部网站管理助手
  • 营销型网站设计论文最全的百度网盘搜索引擎
  • 门户网站改版方案网站被黑解决方案
  • 企业网站的结构以及内容.郑州网站建设技术托管
  • 1营销型网站建设电商网站运营
  • 自己电脑上做网站怎么使用源码网站建设哈尔滨
  • 个人网站备案 名称山西招标网
  • 深圳做网站公司那家比较好网站开发流程注意事项
  • dw自己做的网站手机进不去舟山 做企业网站
  • 中国建设银行网站用户名是什么意思常用的关键词挖掘工具
  • wordpress启用小工具seo快排
  • 企业管理的官方网站有哪些国外搜索引擎排名百鸣
  • 网站建设服务详细解读做医疗护具网站
  • 我想网站建设多少钱成都网站建设有名的公司
  • 测速网站怎么做泰安住房和城乡建设厅网站
  • 天津网站建设平台短链接在线工具
  • 海南景区网站建设方案彩页设计培训
  • 一条龙网站建设哪家好网站域名解析设置
  • 做自己卖东西的网站专业做网站方案ppt
  • 怎么能让我的网站被百度收录弄淘宝招牌图什么网站可以做
  • 微积壹佰 网站建设wordpress安装dplayer
  • 做网站编辑需要会什么罗湖网站建设报价
  • 做网站需要什么准备企业做一个网站的费用
  • 专业移动网站建设哪一家网站做简历
  • 青海报社网站建设公司可以建设网站
  • 网站流量在哪设置百度seo查询收录查询
  • 临沂网站建设多少钱宣传推广费用预算
  • 无忧网站优化网站建设的流程步骤
  • 网站热销榜怎么做网站备案地点
  • 西安网站托管专业公司秦皇岛的网站建设公司