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


Java InstanceFieldRef.getField方法代码示例

本文整理汇总了Java中soot.jimple.InstanceFieldRef.getField方法的典型用法代码示例。如果您正苦于以下问题:Java InstanceFieldRef.getField方法的具体用法?Java InstanceFieldRef.getField怎么用?Java InstanceFieldRef.getField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在soot.jimple.InstanceFieldRef的用法示例。


在下文中一共展示了InstanceFieldRef.getField方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hasPrefix

import soot.jimple.InstanceFieldRef; //导入方法依赖的package包/类
public boolean hasPrefix(Value v) { // if this has prefix v
	if (v instanceof Local) {
		if (local == null)
			return false;
		else
			return (local.equals(v));

	} else if (v instanceof InstanceFieldRef) {
		InstanceFieldRef ifr = (InstanceFieldRef) v;
		if (local == null) {
			if (ifr.getBase() != null)
				return false;
		} else if (!local.equals(ifr.getBase()))
			return false;
		if (fields.length > 0 && ifr.getField() == fields[0])
			return true;
		return false;

	} else if (v instanceof StaticFieldRef) {
		StaticFieldRef sfr = (StaticFieldRef) v;
		if (local != null)
			return false;
		if (fields.length > 0 && sfr.getField() == fields[0])
			return true;
		return false;

	} else if (v instanceof ArrayRef) {
		ArrayRef ar = (ArrayRef) v;
		if (local == null)
			return false;
		else
			return (local.equals(ar.getBase()));

	} else if (v instanceof Constant) {
		return false;
	} else
		throw new RuntimeException("Unexpected left side " + v.getClass());
}
 
开发者ID:secure-software-engineering,项目名称:cheetah,代码行数:39,代码来源:FlowAbstraction.java

示例2: buildInstanceFieldPutInsn

import soot.jimple.InstanceFieldRef; //导入方法依赖的package包/类
private Insn buildInstanceFieldPutInsn(InstanceFieldRef destRef, Value source) {
	SootField destSootField = destRef.getField();
	BuilderFieldReference destField = DexPrinter.toFieldReference(destSootField, belongingFile);
	Value instance = destRef.getBase();
	Register instanceReg = regAlloc.asLocal(instance);
	Register sourceReg = regAlloc.asImmediate(source, constantV);
	Opcode opc = getPutGetOpcodeWithTypeSuffix("iput", destField.getType());
	return new Insn22c(opc, sourceReg, instanceReg, destField);
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:10,代码来源:StmtVisitor.java

示例3: buildInstanceFieldGetInsn

import soot.jimple.InstanceFieldRef; //导入方法依赖的package包/类
private Insn buildInstanceFieldGetInsn(Register destinationReg, InstanceFieldRef sourceRef) {
	Value instance = sourceRef.getBase();
	Register instanceReg = regAlloc.asLocal(instance);
	SootField sourceSootField = sourceRef.getField();
	BuilderFieldReference sourceField = DexPrinter.toFieldReference(sourceSootField, belongingFile);
	Opcode opc = getPutGetOpcodeWithTypeSuffix("iget", sourceField.getType());
	return new Insn22c(opc, destinationReg, instanceReg, sourceField);
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:9,代码来源:StmtVisitor.java

示例4: str

import soot.jimple.InstanceFieldRef; //导入方法依赖的package包/类
/**
 * gives back a representation of the field 
 * @param fr an instance field
 * @return
 */
static String str(InstanceFieldRef fr) {
	SootField sf = fr.getField ();
	return (fr.getBase ()).toString () + "." + (sf.getDeclaringClass ()).getName () + "." + sf.getName () ;
}
 
开发者ID:Orange-OpenSource,项目名称:matos-tool,代码行数:10,代码来源:MethodSpyAnalysis.java


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