当前位置: 首页>>代码示例>>Java>>正文


Java Symbol类代码示例

本文整理汇总了Java中org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol的典型用法代码示例。如果您正苦于以下问题:Java Symbol类的具体用法?Java Symbol怎么用?Java Symbol使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Symbol类属于org.jf.dexlib2.dexbacked.OatFile.SymbolTable包,在下文中一共展示了Symbol类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSymbols

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public List<Symbol> getSymbols() {
    return new AbstractList<Symbol>() {
        @Override public Symbol get(int index) {
            if (index < 0 || index >= entryCount) {
                throw new IndexOutOfBoundsException();
            }
            if (is64bit) {
                return new Symbol64(offset + index * entrySize);
            } else {
                return new Symbol32(offset + index * entrySize);
            }
        }

        @Override public int size() {
            return entryCount;
        }
    };
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:19,代码来源:OatFile.java

示例2: getSymbols

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
@Nonnull
public List<Symbol> getSymbols() {
    return new AbstractList<Symbol>() {
        @Override public Symbol get(int index) {
            if (index < 0 || index >= entryCount) {
                throw new IndexOutOfBoundsException();
            }
            if (is64bit) {
                return new Symbol64(offset + index * entrySize);
            } else {
                return new Symbol32(offset + index * entrySize);
            }
        }

        @Override public int size() {
            return entryCount;
        }
    };
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:20,代码来源:OatFile.java

示例3: OatFile

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public OatFile( byte[] buf) {
    super(buf);

    if (buf.length < MIN_ELF_HEADER_SIZE) {
        throw new NotAnOatFileException();
    }

    verifyMagic(buf);

    if (buf[4] == 1) {
        is64bit = false;
    } else if (buf[4] == 2) {
        is64bit = true;
    } else {
        throw new InvalidOatFileException(String.format("Invalid word-size value: %x", buf[5]));
    }

    OatHeader oatHeader = null;
    SymbolTable symbolTable = getSymbolTable();
    for (Symbol symbol: symbolTable.getSymbols()) {
        if (symbol.getName().equals("oatdata")) {
            oatHeader = new OatHeader(symbol.getFileOffset());
            break;
        }
    }

    if (oatHeader == null) {
        throw new InvalidOatFileException("Oat file has no oatdata symbol");
    }
    this.oatHeader = oatHeader;

    if (!oatHeader.isValid()) {
        throw new InvalidOatFileException("Invalid oat magic value");
    }

    this.opcodes = Opcodes.forArtVersion(oatHeader.getVersion());
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:38,代码来源:OatFile.java

示例4: OatFile

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public OatFile(@Nonnull byte[] buf) {
    super(buf);

    if (buf.length < MIN_ELF_HEADER_SIZE) {
        throw new NotAnOatFileException();
    }

    verifyMagic(buf);

    if (buf[4] == 1) {
        is64bit = false;
    } else if (buf[4] == 2) {
        is64bit = true;
    } else {
        throw new InvalidOatFileException(String.format("Invalid word-size value: %x", buf[5]));
    }

    OatHeader oatHeader = null;
    SymbolTable symbolTable = getSymbolTable();
    for (Symbol symbol: symbolTable.getSymbols()) {
        if (symbol.getName().equals("oatdata")) {
            oatHeader = new OatHeader(symbol.getFileOffset());
            break;
        }
    }

    if (oatHeader == null) {
        throw new InvalidOatFileException("Oat file has no oatdata symbol");
    }
    this.oatHeader = oatHeader;

    if (!oatHeader.isValid()) {
        throw new InvalidOatFileException("Invalid oat magic value");
    }

    this.opcodes = Opcodes.forArtVersion(oatHeader.getVersion());
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:38,代码来源:OatFile.java

示例5: OatFile

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public OatFile(@Nonnull byte[] buf) {
    super(buf);

    if (buf.length < ELF_HEADER_SIZE) {
        throw new NotAnOatFileException();
    }

    verifyMagic(buf);

    OatHeader oatHeader = null;
    SymbolTable symbolTable = getSymbolTable();
    for (Symbol symbol: symbolTable.getSymbols()) {
        if (symbol.getName().equals("oatdata")) {
            oatHeader = new OatHeader(symbol.getFileOffset());
            break;
        }
    }

    if (oatHeader == null) {
        throw new InvalidOatFileException("Oat file has no oatdata symbol");
    }
    this.oatHeader = oatHeader;

    if (!oatHeader.isValid()) {
        throw new InvalidOatFileException("Invalid oat magic value");
    }

    this.opcodes = Opcodes.forArtVersion(oatHeader.getVersion());
}
 
开发者ID:CvvT,项目名称:DexTamper,代码行数:30,代码来源:OatFile.java

示例6: getSymbols

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
@Nonnull
public List<Symbol> getSymbols() {
    return new AbstractList<Symbol>() {
        @Override public Symbol get(int index) {
            if (index < 0 || index >= entryCount) {
                throw new IndexOutOfBoundsException();
            }
            return new Symbol(offset + index * entrySize);
        }

        @Override public int size() {
            return entryCount;
        }
    };
}
 
开发者ID:CvvT,项目名称:DexTamper,代码行数:16,代码来源:OatFile.java

示例7: Symbol

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public Symbol(int offset) {
    this.offset = offset;
}
 
开发者ID:CvvT,项目名称:DexTamper,代码行数:4,代码来源:OatFile.java

示例8: Symbol

import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public Symbol(int offset) { this.offset = offset; } 
开发者ID:AndreJCL,项目名称:JCL,代码行数:2,代码来源:OatFile.java


注:本文中的org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。