本文整理汇总了Java中org.jf.dexlib2.dexbacked.util.FixedSizeSet类的典型用法代码示例。如果您正苦于以下问题:Java FixedSizeSet类的具体用法?Java FixedSizeSet怎么用?Java FixedSizeSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FixedSizeSet类属于org.jf.dexlib2.dexbacked.util包,在下文中一共展示了FixedSizeSet类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClasses
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Nonnull
@Override
public Set<? extends DexBackedClassDef> getClasses() {
return new FixedSizeSet<DexBackedClassDef>() {
@Nonnull
@Override
public DexBackedClassDef readItem(int index) {
return new DexBackedClassDef(DexBackedDexFile.this, getClassDefItemOffset(index));
}
@Override
public int size() {
return classCount;
}
};
}
示例2: getInterfaces
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Nonnull
@Override
public Set<String> getInterfaces() {
final int interfacesOffset = dexFile.readSmallUint(classDefOffset + ClassDefItem.INTERFACES_OFFSET);
if (interfacesOffset > 0) {
final int size = dexFile.readSmallUint(interfacesOffset);
return new FixedSizeSet<String>() {
@Nonnull
@Override
public String readItem(int index) {
return dexFile.getType(dexFile.readUshort(interfacesOffset + 4 + (2*index)));
}
@Override public int size() { return size; }
};
}
return ImmutableSet.of();
}
示例3: getClasses
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Nonnull
@Override
public Set<? extends DexBackedClassDef> getClasses() {
return new FixedSizeSet<DexBackedClassDef>() {
@Nonnull
@Override
public DexBackedClassDef readItem(int index) {
return new DexBackedClassDef(DexBackedDexFile.this, getClassDefItemOffset(index));
}
@Override
public int size() {
return classCount;
}
};
}
示例4: getInterfaces
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Nonnull
@Override
public Set<String> getInterfaces() {
final int interfacesOffset = dexFile.readSmallUint(classDefOffset + ClassDefItem.INTERFACES_OFFSET);
if (interfacesOffset > 0) {
final int size = dexFile.readSmallUint(interfacesOffset);
return new FixedSizeSet<String>() {
@Nonnull
@Override
public String readItem(int index) {
return dexFile.getType(dexFile.readUshort(interfacesOffset + 4 + (2 * index)));
}
@Override
public int size() {
return size;
}
};
}
return ImmutableSet.of();
}
示例5: getClasses
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Override
public Set<? extends DexBackedClassDef> getClasses() {
return new FixedSizeSet<DexBackedClassDef>() {
@Override
public DexBackedClassDef readItem(int index) {
return new DexBackedClassDef(DexBackedDexFile.this, getClassDefItemOffset(index));
}
@Override
public int size() {
return classCount;
}
};
}
示例6: getClasses
import org.jf.dexlib2.dexbacked.util.FixedSizeSet; //导入依赖的package包/类
@Nonnull
@Override
public Set<? extends DexBackedClassDef> getClasses() {
return new FixedSizeSet<DexBackedClassDef>() {
@Nonnull
@Override
/*
* (non-Javadoc)
* Modified by CwT
* Modified this place in order to add extra class in a new dex file
* we add extra classes in class pool make the classcount bigger than the origin
* number, but we can not get the class body from the origin file. So, the extra
* classes body need to be extracted from the other file
* @see org.jf.dexlib2.dexbacked.util.FixedSizeSet#readItem(int)
*/
public DexBackedClassDef readItem(int index) {
if (index < classCount) {
return new DexBackedClassDef(DexBackedDexFile.this, getClassDefItemOffset(index));
}else{
DexBackedClassDef classdef = new DexBackedClassDef(addDexFile,
addDexFile.getClassDefItemOffset(index-classCount));
if (filter != null) {
return filter.rewrite(classdef);
}
return classdef;
}
}
@Override
public int size() {
return classCount + (addDexFile == null ? 0 : addDexFile.getClassCount());
}
};
}