搜索:

java反编译源代码处理技巧

 public static final class Type extends Enum
    {   public static final Type SELECT;
        public static final Type UPDATE;
        public static final Type INSERT;
        public static final Type DELETE;
        private static final Type $VALUES[];
 
        public static final Type[] values()
        {
            return (Type[])$VALUES.clone();
        }
 
        public static Type valueOf(String name) {
            return (Type)Enum.valueOf(com/***/***/***/***$Type, name);
        }
 
        static
        {
            SELECT = new Type("SELECT", 0);
            UPDATE = new Type("UPDATE", 1);
            INSERT = new Type("INSERT", 2);
            DELETE = new Type("DELETE", 3);
            $VALUES = (new Type[] {
                SELECT, UPDATE, INSERT, DELETE
            });
        }
 
        private Type(String s, int i)
        {
            super(s, i);
        }
    }
  public enum Type {
SELECT, UPDATE, INSERT, DELETE
};

enum的处理

 

Script script;
        int iLine;
        int ofInLine;
        script = m_script;
        iLine = script.getLine();
        ofInLine = script.getOffset();
        if(script.nextChar() != '<') goto _L2; else goto _L1
_L1:
        script.nextChar();
        JVM INSTR lookupswitch 3: default 330
    //                   33: 124
    //                   47: 72
    //                   63: 98;
           goto _L3 _L4 _L5 _L6
_L5:
        m_nCtx = 5;
        return new XmlToken(XmlToken.TOK_ENDTAG_START, iLine, ofInLine, script.getOffset() - ofInLine);
_L6:
        m_nCtx = 4;
        return new XmlToken(XmlToken.TOK_PI_START, iLine, ofInLine, script.getOffset() - ofInLine);
_L4:
        script.nextChar();
        JVM INSTR lookupswitch 3: default 313
    //                   45: 164
    //                   68: 275
    //                   91: 196;
           goto _L7 _L8 _L9 _L10
_L8:
        match('-');
        m_nCtx = 3;
        return new XmlToken(XmlToken.TOK_COMMENT_START, iLine, ofInLine, script.getOffset() - ofInLine);
_L10:
        String sData;
        match("CDATA[");
        ParsePosition pos = script.savePosition();
        scan("]]>");
        sData = script.subScript(pos).toString();
        script.nextChar();
        script.nextChar();
        script.nextChar();
        return new XmlToken(2, 4, 4, sData, sData, iLine, ofInLine, script.getOffset() - ofInLine);
_L9:
        script.putBackChar();
        match("DOCTYPE");
        m_nCtx = 2;
        return new XmlToken(XmlToken.TOK_DOCTYPE_START, iLine, ofInLine, script.getOffset() - ofInLine);
_L7:
        script.putBackChar();
        match('-');
        throw internalError();
_L3:
        script.putBackChar();
        m_nCtx = 5;
        return new XmlToken(XmlToken.TOK_ELEMENT_START, iLine, ofInLine, script.getOffset() - ofInLine);
_L2:
        script.putBackChar();
        ParsePosition pos = script.savePosition();
        while(script.nextChar() != '<') ;
        script.putBackChar();
        sData = script.subScript(pos).toString();
        return new XmlToken(2, 4, 3, sData, sData, iLine, ofInLine, script.getOffset() - ofInLine);
        EOFException e;
        e;
        logError(3, "XT-002", null, script.getLine(), script.getOffset(), 0);
        throw new CompilerException();
        e;
        logError(3, "XT-003", new String[] {
            e.toString()
        }, script.getLine(), script.getOffset(), 0);
        throw new CompilerException();
  Script script = m_script;
        int iLine = script.getLine(); int ofInLine = script.getOffset();
        try
        {
            ParsePosition pos;
            String sData;
            if(script.nextChar() == '<')
            {
                switch(script.nextChar())
                {
                case 47: // '/'
                    m_nCtx = 5;
                    return new XmlToken(XmlToken.TOK_ENDTAG_START, iLine, ofInLine, script.getOffset() - ofInLine);
 
                case 63: // '?'
                    m_nCtx = 4;
                    return new XmlToken(XmlToken.TOK_PI_START, iLine, ofInLine, script.getOffset() - ofInLine);
 
                case 33: // '!'
                    switch(script.nextChar())
                    {
                    case 45: // '-'
                        match('-');
                        m_nCtx = 3;
                        return new XmlToken(XmlToken.TOK_COMMENT_START, iLine, ofInLine, script.getOffset() - ofInLine);
 
                    case 91: // '['
                        match("CDATA[");
                        pos = script.savePosition();
                        scan("]]>");
                        sData = script.subScript(pos).toString();
                        script.nextChar();
                        script.nextChar();
                        script.nextChar();
                        return new XmlToken(2, 4, 4, sData, sData, iLine, ofInLine, script.getOffset() - ofInLine);
 
                    case 68: // 'D'
                        script.putBackChar();
                        match("DOCTYPE");
                        m_nCtx = 2;
                        return new XmlToken(XmlToken.TOK_DOCTYPE_START, iLine, ofInLine, script.getOffset() - ofInLine);
                    }
                    script.putBackChar();
                    match('-');
                    throw internalError();
                }
                script.putBackChar();
                m_nCtx = 5;
                return new XmlToken(XmlToken.TOK_ELEMENT_START, iLine, ofInLine, script.getOffset() - ofInLine);
            }
            script.putBackChar();
            pos = script.savePosition();
            while(script.nextChar() != '<') ;
            script.putBackChar();
            sData = script.subScript(pos).toString();
            return new XmlToken(2, 4, 3, sData, sData, iLine, ofInLine, script.getOffset() - ofInLine);
        }
        catch(EOFException e)
        {
            logError(3, "XT-002", null, script.getLine(), script.getOffset(), 0);
            throw new CompilerException();
        }
        catch(IOException e)
        {
            logError(3, "XT-003", new String[] {
                e.toString()
            }, script.getLine(), script.getOffset(), 0);
        }
        throw new CompilerException();

作者:大恐龙 - 分类: 'Java/JSP' - - 评论 (0) - 引用通告 (0) - 查看次数: (0)

java反编译源代码处理技巧(2)-break

if(fReentrant)
            {
                aoKey = SimpleEnumerator.toArray(iterator(), ao != null ? ao : OverflowMap.EMPTY_ARRAY);
                break MISSING_BLOCK_LABEL_238;
            }
            gate.close(-1L);
            int cKeys = mapOverflow.size();
            if(ao == null)
            {
                aoKey = new Object[cKeys];
            } else
            {
                int cElements = ao.length;
                if(cKeys > cElements)
                {
                    aoKey = (Object[])Array.newInstance(((Object) (ao)).getClass().getComponentType(), cKeys);
                } else
                {
                    aoKey = ao;
                    if(cKeys < cElements)
                        aoKey[cKeys] = null;
                }
            }
            int iKey = 0;
            Iterator iter = mapOverflow.getStatusMap().entrySet().iterator();
            do
            {
                if(!iter.hasNext())
                    break;
                java.util.Map.Entry entry = (java.util.Map.Entry)iter.next();
                Status status = (Status)entry.getValue();
                if(status.isEntryExistent())
                    aoKey[iKey++] = entry.getKey();
            } while(true);
            if(!$assertionsDisabled && iKey != cKeys)
                throw new AssertionError();
            gate.open();
            break MISSING_BLOCK_LABEL_238;
if(fReentrant)
            {
                aoKey = SimpleEnumerator.toArray(iterator(), ao != null ? ao : OverflowMap.EMPTY_ARRAY);
            }else{
            gate.close(-1L);
            int cKeys = mapOverflow.size();
            if(ao == null)
            {
                aoKey = new Object[cKeys];
            } else
            {
                int cElements = ao.length;
                if(cKeys > cElements)
                {
                    aoKey = (Object[])Array.newInstance(((Object) (ao)).getClass().getComponentType(), cKeys);
                } else
                {
                    aoKey = ao;
                    if(cKeys < cElements)
                        aoKey[cKeys] = null;
                }
            }
            int iKey = 0;
            Iterator iter = mapOverflow.getStatusMap().entrySet().iterator();
            do
            {
                if(!iter.hasNext())
                    break;
                java.util.Map.Entry entry = (java.util.Map.Entry)iter.next();
                Status status = (Status)entry.getValue();
                if(status.isEntryExistent())
                    aoKey[iKey++] = entry.getKey();
            } while(true);
            if(!$assertionsDisabled && iKey != cKeys)
                throw new AssertionError();
            gate.open();
            }

作者:大恐龙 - 分类: 'Java/JSP' - - 评论 (0) - 引用通告 (0) - 查看次数: (0)

java反编译源代码处理技巧(3)-do while

do
                {
                    if(!e.hasMoreElements())
                        break label0;
                    key = (String)e.nextElement();
                } while(!m_tblCache.containsKey(key));
                throw new IllegalStringException(key);
 for(Enumeration e = tblTest.keys(); e.hasMoreElements();)
                {
                    String key = (String)e.nextElement();
                    if(m_tblCache.containsKey(key))
                        throw new IllegalStringException(key);
                }
作者:大恐龙 - 分类: 'Java/JSP' - - 评论 (0) - 引用通告 (0) - 查看次数: (0)
 
static final boolean $assertionsDisabled; /* synthetic field */
  if(!$assertionsDisabled && ((WeakReference)oIterActive).get() != iter)
         throw new AssertionError();
  static {
        $assertionsDisabled = !(SafeHashMap.class).desiredAssertionStatus();
    }
 assert ((WeakReference)oIterActive).get() != iter;
作者:大恐龙 - 分类: 'Java/JSP' - - 评论 (0) - 引用通告 (0) - 查看次数: (0)

给我留言

给我留言:

作者:大恐龙 - 分类: '给我留言' - - 评论 (16) - 引用通告 (0) - 查看次数: (0)

ContentType - 备忘

application/activemessage
application/andrew-inset
application/applefile
application/atomicmail
application/dca-rft
application/dec-dx
application/mac-binhex40 hqx
application/mac-compactpro cpt
application/macwriteii
application/msword doc
application/news-message-id
application/news-transmission
application/octet-stream bin dms lha lzh exe class
application/jsp jsp
application/oda oda
application/pdf pdf
application/postscript ai eps ps
application/powerpoint ppt
application/remote-printing
application/rtf rtf
application/slate
application/wita
application/wordperfect5.1
application/x-bcpio bcpio
application/x-cdlink vcd
application/x-compress Z
application/x-cpio cpio
application/x-csh csh
application/x-director dcr dir dxr
application/x-dvi dvi
application/x-gtar gtar
application/x-gzip gz
application/x-hdf hdf
application/x-httpd-cgi cgi
application/x-java-jnlp-file jnlp
application/x-koan skp skd skt skm
image/x-xpixmap xpm
image/x-xwindowdump xwd

application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc
application/x-tar tar
application/x-tcl tcl
application/x-tex tex
application/x-texinfo texinfo texi
application/x-troff t tr roff
application/x-troff-man man
application/x-troff-me me
application/x-troff-ms ms
application/x-ustar ustar
application/x-wais-source src
text/dtd dtd
text/xsl xsl
text/xml XML ent cat style
application/jsp jsp
application/zip zip
audio/basic au snd
audio/mpeg mpga mp2
audio/x-aiff aif aiff aifc
audio/x-pn-realaudio ram
audio/x-pn-realaudio-plugin rpm
audio/x-realaudio ra
audio/x-wav wav
chemical/x-pdb pdb xyz
image/gif gif
image/ief ief
image/jpeg jpeg jpg jpe
image/png png
image/tiff tiff tif
image/x-cmu-raster ras
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
image/x-portable-pixmap ppm
image/x-rgb rgb
image/x-xbitmap xbm
application/x-latex latex

message/external-body
message/news
message/partial
message/rfc822
multipart/alternative
multipart/appledouble
multipart/digest
multipart/mixed
multipart/parallel
text/html html htm
text/plain txt
text/richtext rtx
text/tab-separated-values tsv
text/x-setext etx
text/x-sgml sgml sgm
video/mpeg mpeg mpg mpe
video/quicktime qt mov
video/x-msvideo avi
video/x-sgi-movie movie
x-conference/x-cooltalk ice
x-world/x-vrml wrl vrml
text/vnd.wap.wml wml
application/vnd.wap.wmlc wmlc
text/vnd.wap.wmlscript wmls
application/vnd.wap.wmlscriptc wmlsc
image/vnd.wap.wbmp wbmp
text/css css
text/vnd.sun.j2me.app-descriptor jad
application/java-archive jar
video/3gp 3gp
video/3gpp mp4
application/x-mif mif
application/x-netcdf nc cdf
application/x-sh sh
application/x-shar shar
application/x-stuffit sit
作者:大恐龙 - 分类: '.Net Framework' - - 评论 (0) - 引用通告 (0) - 查看次数: (0)