1.Plain(简单缩写)

prsf==>private static final
psf==>public static final
psfi==>public static final int
psfs==>public static final String
St==>String
thr==>throw new

2.表达式生成

对象类型

起步:Object msg;
msg.arg==>插入(msg) 用于将指定对象作为参数括起来
msg.cast==>((插入)msg); 类型转换
msg.castvar==>插入1= (插入1) msg; 类型转换生成临时变量
msg.field==>
private Object msg;
this.msg=msg; 生成对应的成员变量,常用于函数中添加成员变量并初始化
msg.inst==>msg instanceof ? ((插入) msg) : null; 生成instanceof关键字
msg.nn==>if(msg !=null) {插入 } 生成不为空判断
msg.notnull==>if(msg !=null) { 插入 } 同上
msg.null==>if(msg==null) {插入 } 生成null判断
msg.opt==>Optional.ofNullab_le(msg); ** 生成Optional包裹的对象
msg.par==>(msg) 加括号
msg.reqnonnull==>Objects._requireNon_Null(msg)
**生成调用Objects.requireNonNull()方法的非空判断
_msg._return
==>return msg; 生成返回
_msg._serr
==>System.err.println(msg); 生成对象的错误打印
msg.souf==>System.out.printf(“”, msg); 生成对象的格式化打印
msg.sout==>System.out.println(msg); 生成换行输出
msg.soutv==>System.out.println(“msg = “ + msg); 生成变量名打印
msg.synchronized==>synchronized(msg) {**
插入_ } **生成synchronized表达式
msg.try 生成try/catch包裹
msg.var==>Object msg1=msg; 生成一个临时变量

boolean类型

起步:boolean b;
b.assert==>assert b 调出assert关键字
b.if==>if(b) {插入 } 生成b的if判断
b.else==>if(!b) {插入 } 生成b的相反if判断
b.not==>!b 生成非b
b.while==>while(b) {插入 } 生成while判断包裹

其他类型

数组/集合.for 生成增强for
数组/Iterable.iter 同上
数组/集合/整型.fori 生成普通for
数组/集合/整型.forr 生成倒转的普通for,从末尾到开头进行遍历
数组.stream==>Arrays.stream(数组) 数组转成stream
字符串.format==>String.format(msg2,插入 ) 生成格式化String
switch支持的类型.switch==>switch(表达式) {插入} 生成switch表达式
函数().lamdba==>()=>函数() 生成lambda表达式;
类名.new==>new 类名() 生成新的new实例
new 异常类().throw==>throw new 异常类() 生成抛出异常

3.迭代

fori==> 生成普通for循环

  1. for (int i = 0; i <插入1; i++) {
  2. //插入2
  3. }

itar==> 生成普通数组的for循环并临时赋值

  1. for (int i = 0; i < array.length; i++) {
  2. int value = array[i];
  3. //插入
  4. }

itco==> 为集合生成iterator迭代

  1. for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) {
  2. Object next = iterator.next();
  3. //插入
  4. }

iten==> 为枚举类型生成迭代

  1. while (enumeration.hasMoreElements()) {
  2. Object o = enumeration.nextElement();
  3. //插入
  4. }

iter==> 为数组和实现了Itearble接口的类型生成迭代

  1. for (int value : values) {
  2. //插入
  3. }

itit==> 生成iterator迭代

  1. while (iterator.hasNext()) {
  2. Object next = iterator.next();
  3. //插入
  4. }

itli==> 为List生成迭代

  1. for (int i = 0; i < list.size(); i++) {
  2. Object o = list.get(i);
  3. //插入
  4. }

ritar==> 为数组生成倒序遍历

  1. for (int i = values.length - 1; i >= 0; i--) {
  2. int value = values[i];
  3. //插入
  4. }

4.输出

serr==>System.err.println(插入); 生成err输出
souf==>System.out.printf(插入); 生成字符串格式输出
sout==>System.out.println(插入); 生成换行输出
soutm==>System.out.println(“MyTest.m1”); 输出当前方法的名字 格式:类名.方法名
soutp==>System.out.println(“msg = “ + msg); 生成方法的参数输出
soutv==>System.out.println(“values = “ + values); 生成最近的变量输出

5.maven

dep==> 生成依赖格式

  1. <dependency>
  2. <groupId></groupId>
  3. <artifactId></artifactId>
  4. <version></version>
  5. </dependency

pl==> 生成插件格式

  1. <plugin>
  2. <groupId></groupId>
  3. <artifactId></artifactId>
  4. <version></version>
  5. </plugin>

repo==> 生成repository 格式

  1. <repository>
  2. <id></id>
  3. <name></name>
  4. <url></url>
  5. </repository>

6.SQL

col==> 生成创建列语句

  1. create table test(
  2. 列名 类型 not null
  3. )

ins==> 生成insert语句

  1. insert into 表名(列名) values (值);

sel==> 生成简单select语句

  1. select * from 表名;

selc==> 生成select count where语句

  1. select count(*)
  2. from 表名 别名
  3. where 别名.列名;

selw==> 生成sqlect where语句

  1. select *
  2. from 表名 别名
  3. where 别名.列名;

tab==> 生成创表语句

  1. create table new_table
  2. (
  3. col int not null
  4. );

upd==> 生成update语句

  1. update 表名
  2. set 列名= 列值
  3. where 条件;


7.其他

CD==> xml中使用生成CDATA用于一些特殊符号的格式转换,如”<”识别成小于号而不是标签开头

  1. <![CDATA[ 插入]]>

geti==> 用于在声明函数的时候使用,会生成一个静态的getInstance函数,可用于单例模式的使用

  1. public static MyTest getInstance() {
  2. return 插入;
  3. }

ifn==> 判断最近可使用变量为空

  1. if (msg == null) {
  2. //插入
  3. }

inn==> 判断最近可使用变量不为空

  1. if (msg != null) {
  2. // 插入
  3. }

inst==> 生成最近可使用变量instanceof关键字判断并转型

  1. if (msg instanceof Object) {
  2. Object o = (Object) msg;
  3. // 插入
  4. }

lazy==> 生成最近可使用变量初始化

  1. if (msg == null) {
  2. msg = new Object();
  3. // 插入
  4. }

lst==> 获取最近可使用数组的最末尾

  1. int[] array=new int[9];
  2. array[array.length - 1]

main/psvm==>生成main函数

  1. public static void main(String[] args) {
  2. // 插入
  3. }

mn==> 快速生成Math.min()
mx==> 快速生成Math.max()

  1. int x=0,y=0;
  2. x = Math.min(x, y);
  3. y = Math.max(y, x);

toar==>快速生成集合转数组(需自己定义里面的new Object[]数组进行转换)

  1. List<String> list=new ArrayList<>();
  2. list.toArray(new Object[list.size()])