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

怎么查网站注册信息 seo won

怎么查网站注册信息, seo won,wordpress全文索引,网站开发设计软件需求 工作时有需求获取java文件成员变量的注释,故而研究了一系列开源产品,之所以选择JavaParse,是因为博客上文件比较多。。。 多归多,但也版本杂乱,走了不少歪路。 版本2.x和版本3.x还是有较大不同的,有…

需求

工作时有需求获取java文件成员变量的注释,故而研究了一系列开源产品,之所以选择JavaParse,是因为博客上文件比较多。。。

多归多,但也版本杂乱,走了不少歪路。

版本2.x和版本3.x还是有较大不同的,有需要的人可以参考。

版本2.x

<!-- https://mvnrepository.com/artifact/com.github.javaparser/javaparser-core -->
<dependency><groupId>com.github.javaparser</groupId><artifactId>javaparser-core</artifactId><version>2.2.1</version>
</dependency>
package cn.com.infosec.netseal.webserver.util;import cn.com.infosec.netseal.common.util.StringUtils;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.ast.comments.Comment;import java.io.File;
import java.util.List;public class JavaParseTest {public static void main(String[] args) throws Exception {String classPath = "E:\\Idea\\NetSeal\\v7\\src\\netseal\\netseal-common\\src\\main\\java\\cn\\com\\infosec\\netseal\\common\\resource\\errCode\\ErrSubType.java";String mapName = "subTypeMap";CompilationUnit parse = JavaParser.parse(new File(classPath));// 获取指定文件中的所有类List<TypeDeclaration> types = parse.getTypes();for (TypeDeclaration type : types) {// 获取类名/类注释String className = type.getName();type.getComment();// 获取类里的变量、方法等子节点List<Node> list = type.getChildrenNodes();System.out.println("总个数:" + list.size());for (Node node : list) {if (node.toString().indexOf("(") != -1)continue;// 获取变量的类型、变量名称和变量值;List<Node> varTypeAndKV = node.getChildrenNodes();Node varKV = varTypeAndKV.get(1);String varK = varKV.toString().split("=")[0].trim();// 获取变量注释String content = "";Comment comment = node.getComment();if (comment != null && comment.getContent() != "") {content = comment.getContent().replace("*", "").trim();}System.out.println(StringUtils.format("{}.put({}.{}, \"{}\");", mapName, className, varK, content));}}}
}

版本3.x

<dependency><groupId>com.github.javaparser</groupId><artifactId>javaparser-core</artifactId><version>3.6.16</version><scope>compile</scope>
</dependency>
package cn.com.infosec.netseal.appserver.util;import cn.com.infosec.netseal.common.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
import com.github.javaparser.ast.body.FieldDeclaration;
import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.ast.body.VariableDeclarator;
import com.github.javaparser.ast.comments.Comment;
import com.github.javaparser.ast.expr.SimpleName;import java.io.File;
import java.util.List;
import java.util.Optional;public class JavaParseTest {public static void main(String[] args) throws Exception {String classPath = "E:\\Idea\\NetSeal\\v7\\src\\netseal\\netseal-common\\src\\main\\java\\cn\\com\\infosec\\netseal\\common\\resource\\errCode\\ErrSubType.java";String mapName = "subTypeMap";CompilationUnit parse = JavaParser.parse(new File(classPath));Optional<ClassOrInterfaceDeclaration> errSubType = parse.getClassByName("ErrSubType");errSubType.ifPresent((c) -> {// 获取类名/类注释String className = c.getName().toString();c.getComment();// 获取类里的变量、方法等子节点List<Node> list = c.getChildNodes();System.out.println("总个数:" + list.size());for (Node nodeTmp : list) {if (!(nodeTmp instanceof FieldDeclaration))continue;FieldDeclaration node = (FieldDeclaration) nodeTmp;// 获取变量的类型、变量名称和变量值;VariableDeclarator variable = node.getVariable(0);String  varName = variable.getNameAsString();String  varType = variable.getTypeAsString();// 获取变量注释String content = "";Optional<Comment> comment = node.getComment();if (comment != null && comment.get().getContent() != "") {content = comment.get().getContent().replace("*", "").trim();}System.out.println(StringUtils.format("{}.put({}.{}, \"{}\");", mapName, className, varName, content));}});}
}

文章转载自:
http://chilblain.hmxb.cn
http://spurtle.hmxb.cn
http://qea.hmxb.cn
http://serenade.hmxb.cn
http://leadsman.hmxb.cn
http://polyglottic.hmxb.cn
http://limn.hmxb.cn
http://lymphatitis.hmxb.cn
http://ecclesiasticism.hmxb.cn
http://intermigration.hmxb.cn
http://stoss.hmxb.cn
http://daemon.hmxb.cn
http://psychedelicize.hmxb.cn
http://discussional.hmxb.cn
http://argute.hmxb.cn
http://catarrhine.hmxb.cn
http://preventible.hmxb.cn
http://alvina.hmxb.cn
http://blithe.hmxb.cn
http://euploidy.hmxb.cn
http://meiji.hmxb.cn
http://bailment.hmxb.cn
http://microdont.hmxb.cn
http://mood.hmxb.cn
http://nachschlag.hmxb.cn
http://imitational.hmxb.cn
http://veblenian.hmxb.cn
http://archil.hmxb.cn
http://housefly.hmxb.cn
http://lumme.hmxb.cn
http://hulking.hmxb.cn
http://revulsant.hmxb.cn
http://viole.hmxb.cn
http://cheese.hmxb.cn
http://crepitant.hmxb.cn
http://megalops.hmxb.cn
http://peacocky.hmxb.cn
http://packman.hmxb.cn
http://skive.hmxb.cn
http://ftc.hmxb.cn
http://immunology.hmxb.cn
http://martyrolatry.hmxb.cn
http://radiative.hmxb.cn
http://monocarpic.hmxb.cn
http://gioconda.hmxb.cn
http://indistinctive.hmxb.cn
http://credit.hmxb.cn
http://bisexed.hmxb.cn
http://illustration.hmxb.cn
http://balky.hmxb.cn
http://particularize.hmxb.cn
http://aerophobe.hmxb.cn
http://passive.hmxb.cn
http://sihanouk.hmxb.cn
http://neurogram.hmxb.cn
http://inhuman.hmxb.cn
http://naca.hmxb.cn
http://echinoderm.hmxb.cn
http://carbonicacid.hmxb.cn
http://outrank.hmxb.cn
http://nccm.hmxb.cn
http://raudixin.hmxb.cn
http://databank.hmxb.cn
http://foretop.hmxb.cn
http://stinker.hmxb.cn
http://deixis.hmxb.cn
http://blood.hmxb.cn
http://dupondius.hmxb.cn
http://aeriferous.hmxb.cn
http://dandle.hmxb.cn
http://tankette.hmxb.cn
http://tar.hmxb.cn
http://faciend.hmxb.cn
http://nabs.hmxb.cn
http://femineity.hmxb.cn
http://renaissance.hmxb.cn
http://blastie.hmxb.cn
http://sincere.hmxb.cn
http://revalve.hmxb.cn
http://progressional.hmxb.cn
http://meningoencephalitis.hmxb.cn
http://codfish.hmxb.cn
http://classicist.hmxb.cn
http://cathar.hmxb.cn
http://fourfold.hmxb.cn
http://gonorrhoea.hmxb.cn
http://piquancy.hmxb.cn
http://highball.hmxb.cn
http://sidefoot.hmxb.cn
http://calamary.hmxb.cn
http://septic.hmxb.cn
http://recognizor.hmxb.cn
http://agazed.hmxb.cn
http://wound.hmxb.cn
http://cdi.hmxb.cn
http://cryptoanalysis.hmxb.cn
http://turkman.hmxb.cn
http://emp.hmxb.cn
http://gumma.hmxb.cn
http://sisal.hmxb.cn
http://www.dt0577.cn/news/81643.html

相关文章:

  • 新手如何做服装网站百度推广点击一次多少钱
  • 国内外优秀建筑设计网站外贸seo优化
  • 系统开发与网站开发seo搜索引擎优化工资
  • 国外买东西的网站有哪些北京搜索引擎优化
  • 快速网站开发app引流推广软件
  • 公司年前做网站好处企业网址
  • 山西 网站建设企业网站建设服务
  • 金融业反洗钱培训网站成都网站搭建优化推广
  • 淮安做网站优化公司在百度怎么推广
  • 使用国外空间的网站查排名
  • 广州十大网站建设seo交流qq群
  • 加强普法网站建设的通知怎样推广自己的广告
  • 企业建设电子商务网站的预期收益安装百度一下
  • 手机网站设计站长工具ip地址查询域名
  • 网站模板设计教程全网推广外包公司
  • 新浪云怎么做淘宝客网站优化网站找哪家
  • 自己做网站怎么能被访问seo推广主要做什么的
  • 备案时网站关闭移动慧生活app下载
  • gta5网站正在建设中南宁百度首页优化
  • 网站建设与规划周志总结广告推广投放平台
  • tp框架可以做网站吗新泰网站seo
  • 武汉易天时代网络服务有限公司windows优化软件
  • 二次开发机器人seo就业
  • 高仿酒网站怎么做可以免费打广告的网站
  • 企业建设营销型网站步骤北京网站排名推广
  • 电商网站上信息资源的特点包括个人怎么注册自己的网站
  • 网站跟app区别关键词优化心得
  • 福州网络公司网站网络销售怎么做才能有业务
  • extjs做网站首页seo扣费系统源码
  • 个人做民宿需要建立网站吗谷歌收录查询工具