本文整理汇总了Java中com.android.dx.rop.cst.CstFieldRef类的典型用法代码示例。如果您正苦于以下问题:Java CstFieldRef类的具体用法?Java CstFieldRef怎么用?Java CstFieldRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CstFieldRef类属于com.android.dx.rop.cst包,在下文中一共展示了CstFieldRef类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isCompatible
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 2) &&
unsignedFitsInNibble(regs.get(0).getReg()) &&
unsignedFitsInNibble(regs.get(1).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
int cpi = ci.getIndex();
if (! unsignedFitsInShort(cpi)) {
return false;
}
Constant cst = ci.getConstant();
return (cst instanceof CstType) ||
(cst instanceof CstFieldRef);
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:Form22c.java
示例2: get
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public IndexedItem get(Constant cst) {
if (cst == null) {
throw new NullPointerException("cst == null");
}
throwIfNotPrepared();
IndexedItem result = fieldIds.get((CstFieldRef) cst);
if (result == null) {
throw new IllegalArgumentException("not found");
}
return result;
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:18,代码来源:FieldIdsSection.java
示例3: intern
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/**
* Interns an element into this instance.
*
* @param field {@code non-null;} the reference to intern
* @return {@code non-null;} the interned reference
*/
public synchronized FieldIdItem intern(CstFieldRef field) {
if (field == null) {
throw new NullPointerException("field == null");
}
throwIfPrepared();
FieldIdItem result = fieldIds.get(field);
if (result == null) {
result = new FieldIdItem(field);
fieldIds.put(field, result);
}
return result;
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:FieldIdsSection.java
示例4: indexOf
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/**
* Gets the index of the given reference, which must have been added
* to this instance.
*
* @param ref {@code non-null;} the reference to look up
* @return {@code >= 0;} the reference's index
*/
public int indexOf(CstFieldRef ref) {
if (ref == null) {
throw new NullPointerException("ref == null");
}
throwIfNotPrepared();
FieldIdItem item = fieldIds.get(ref);
if (item == null) {
throw new IllegalArgumentException("not found");
}
return item.getIndex();
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:FieldIdsSection.java
示例5: if
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/**
* Interns the given constant in the appropriate section of this
* instance, or do nothing if the given constant isn't the sort
* that should be interned.
*
* @param cst {@code non-null;} constant to possibly intern
*/
/*package*/ void internIfAppropriate(Constant cst) {
if (cst instanceof CstString) {
stringIds.intern((CstString) cst);
} else if (cst instanceof CstType) {
typeIds.intern((CstType) cst);
} else if (cst instanceof CstBaseMethodRef) {
methodIds.intern((CstBaseMethodRef) cst);
} else if (cst instanceof CstFieldRef) {
fieldIds.intern((CstFieldRef) cst);
} else if (cst instanceof CstEnumRef) {
fieldIds.intern(((CstEnumRef) cst).getFieldRef());
} else if (cst == null) {
throw new NullPointerException("cst == null");
}
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:DexFile.java
示例6: addDependencies
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
private void addDependencies(ConstantPool pool) {
for (Constant constant : pool.getEntries()) {
if (constant instanceof CstType) {
checkDescriptor(((CstType) constant).getClassType());
} else if (constant instanceof CstFieldRef) {
checkDescriptor(((CstFieldRef) constant).getType());
} else if (constant instanceof CstMethodRef) {
Prototype proto = ((CstMethodRef) constant).getPrototype();
checkDescriptor(proto.getReturnType());
StdTypeList args = proto.getParameterTypes();
for (int i = 0; i < args.size(); i++) {
checkDescriptor(args.get(i));
}
}
}
}
开发者ID:dodola,项目名称:RocooFix,代码行数:18,代码来源:ClassReferenceListBuilder.java
示例7: addDependencies
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
private void addDependencies(DirectClassFile classFile) {
for (Constant constant : classFile.getConstantPool().getEntries()) {
if (constant instanceof CstType) {
checkDescriptor(((CstType) constant).getClassType().getDescriptor());
} else if (constant instanceof CstFieldRef) {
checkDescriptor(((CstFieldRef) constant).getType().getDescriptor());
} else if (constant instanceof CstBaseMethodRef) {
checkPrototype(((CstBaseMethodRef) constant).getPrototype());
}
}
FieldList fields = classFile.getFields();
int nbField = fields.size();
for (int i = 0; i < nbField; i++) {
checkDescriptor(fields.get(i).getDescriptor().getString());
}
MethodList methods = classFile.getMethods();
int nbMethods = methods.size();
for (int i = 0; i < nbMethods; i++) {
checkPrototype(Prototype.intern(methods.get(i).getDescriptor().getString()));
}
}
开发者ID:dodola,项目名称:RocooFix,代码行数:22,代码来源:ClassReferenceListBuilder.java
示例8: intern
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
/**
* Interns an element into this instance.
*
* @param field {@code non-null;} the reference to intern
* @return {@code non-null;} the interned reference
*/
public FieldIdItem intern(CstFieldRef field) {
if (field == null) {
throw new NullPointerException("field == null");
}
throwIfPrepared();
FieldIdItem result = fieldIds.get(field);
if (result == null) {
result = new FieldIdItem(field);
fieldIds.put(field, result);
}
return result;
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:FieldIdsSection.java
示例9: addDependencies
import com.android.dx.rop.cst.CstFieldRef; //导入依赖的package包/类
private void addDependencies(DirectClassFile classFile) {
for (Constant constant : classFile.getConstantPool().getEntries()) {
if (constant instanceof CstType) {
checkDescriptor(((CstType) constant).getClassType().getDescriptor());
} else if (constant instanceof CstFieldRef) {
checkDescriptor(((CstFieldRef) constant).getType().getDescriptor());
} else if (constant instanceof CstBaseMethodRef) {
checkPrototype(((CstBaseMethodRef) constant).getPrototype());
}
}
FieldList fields = classFile.getFields();
int nbField = fields.size();
for (int i = 0; i < nbField; i++) {
checkDescriptor(fields.get(i).getDescriptor().getString());
}
MethodList methods = classFile.getMethods();
int nbMethods = methods.size();
for (int i = 0; i < nbMethods; i++) {
checkPrototype(Prototype.intern(methods.get(i).getDescriptor().getString()));
}
}
开发者ID:johnlee175,项目名称:dex,代码行数:24,代码来源:ClassReferenceListBuilder.java
注:本文中的com.android.dx.rop.cst.CstFieldRef类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论