zoukankan      html  css  js  c++  java
  • 泛型

    package com.mmall.common;
    
    public enum ResponseCode {
    
        SUCCESS(0,"SUCESSS"),
        ERROR(1,"ERROR"),
        NEED_LOGIN(10,"NEWWD_LOGIN"),
        ILLEGAL_ARGUMENT(2,"ILLEGAL_AGRUMENT");
    
        private final int code;
        private final String desc;
    
    
        ResponseCode(int code,String desc){
    
            this.code = code;
            this.desc = desc;
        }
    
        public int getCode(){
    
            return code;
        }
    
        public String getDesc(){
    
            return desc;
        }
    
    
    
    }
    
    

    反编译命令是java -jar cfr_0_125.jar --sugarenums false ResponseCode.class
    --sugarenums false参数作用是去除语法糖

    /*
     * Decompiled with CFR 0_125.
     *
     * Could not load the following classes:
     *  java.lang.Enum
     *  java.lang.Object
     *  java.lang.String
     */
    package com.mmall.common;
    
    public final class ResponseCode
    extends Enum<ResponseCode> {
        public static final /* enum */ ResponseCode SUCCESS = new ResponseCode(0, "SUCESSS");
        public static final /* enum */ ResponseCode ERROR = new ResponseCode(1, "ERROR");
        public static final /* enum */ ResponseCode NEED_LOGIN = new ResponseCode(10, "NEWWD_LOGIN");
        public static final /* enum */ ResponseCode ILLEGAL_ARGUMENT = new ResponseCode(2, "ILLEGAL_AGRUMENT");
        private final int code;
        private final String desc;
        private static final /* synthetic */ ResponseCode[] $VALUES;
    
        public static ResponseCode[] values() {
            return (ResponseCode[])$VALUES.clone();
        }
    
        public static ResponseCode valueOf(String string) {
            return (ResponseCode)Enum.valueOf(ResponseCode.class, (String)string);
        }
    
        private ResponseCode(int n2, String string2) {
            super(string, n);
            this.code = n2;
            this.desc = string2;
        }
    
        public int getCode() {
            return this.code;
        }
    
        public String getDesc() {
            return this.desc;
        }
    
        static {
            $VALUES = new ResponseCode[]{SUCCESS, ERROR, NEED_LOGIN, ILLEGAL_ARGUMENT};
        }
    }
    
  • 相关阅读:
    centos7内存处理
    MySQl分析工具之mysqltuner.pl及mysqlslap
    Mycat-web 安装
    【NOI2001】【Luogu P2704】【POJ1185】炮兵阵地
    【OpenJudge 7834】分成互质组
    Assignment(单调队列)
    OO’s Sequence
    【注意】邻接表
    20190405模拟测试
    【USACO2010open】时间旅行
  • 原文地址:https://www.cnblogs.com/caidongzhou/p/9150924.html
Copyright © 2011-2022 走看看