本文整理汇总了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;
}
};
}
示例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;
}
};
}
示例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());
}
示例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());
}
示例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());
}
示例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;
}
};
}
示例7: Symbol
import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public Symbol(int offset) {
this.offset = offset;
}
示例8: Symbol
import org.jf.dexlib2.dexbacked.OatFile.SymbolTable.Symbol; //导入依赖的package包/类
public Symbol(int offset) { this.offset = offset; }