• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java NumberedString类的典型用法和代码示例

java 1次浏览

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

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

示例1: getCallTargets

点赞 3

import soot.util.NumberedString; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected Set<SootMethod> getCallTargets(PointsToSetInternal p2Set,
		NumberedString methodStr, Type receiverType,
		Set<SootMethod> possibleTargets) {
	List<Object> args = Arrays.asList(p2Set, methodStr, receiverType,
			possibleTargets);
	if (callTargetsArgCache.containsKey(args)) {
		return callTargetsArgCache.get(args);
	}
	Set<Type> types = p2Set.possibleTypes();
	Set<SootMethod> ret = new HashSet<SootMethod>();
	for (Type type : types) {
		ret.addAll(getCallTargetsForType(type, methodStr, receiverType,
				possibleTargets));
	}
	callTargetsArgCache.put(args, ret);
	return ret;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:19,
代码来源:DemandCSPointsTo.java

示例2: getCallTargets

点赞 3

import soot.util.NumberedString; //导入依赖的package包/类
/**
 * Obtain the set of possible call targets at given @param callsite.
 */
private void getCallTargets(IVarAbstraction pn, SootMethod src,
		Stmt callsite, ChunkedQueue<SootMethod> targetsQueue)
{
	InstanceInvokeExpr iie = (InstanceInvokeExpr)callsite.getInvokeExpr();
	Local receiver = (Local)iie.getBase();
	NumberedString subSig = iie.getMethodRef().getSubSignature();
	
	// We first build the set of possible call targets
	for (AllocNode an : pn.get_all_points_to_objects()) {
		Type type = an.getType();
		if (type == null) continue;

		VirtualCalls.v().resolve(type, 
				receiver.getType(), subSig, src,
				targetsQueue);
	}
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:21,
代码来源:GeomPointsTo.java

示例3: finish_registration

点赞 3

import soot.util.NumberedString; //导入依赖的package包/类
/**
 * Finishes the registration: we remember all the rules we are working on and for each method
 * spied by a call rule, we maintain the list of rules it had.
 */
private void finish_registration() {
	every_calls.putAll(call_tables);
	every_returns.putAll(return_tables);
	every_fields.putAll(field_tables);
	
	for (SpyMethod def : call_tables.values()) {
		SootMethod m = def.getMethod();
		int idx = m.getNumber();
		add_to_spytable(idx,def);
		// if (m.isAbstract()) {
			SootClass c = m.getDeclaringClass();
			NumberedString sign = m.getNumberedSubSignature();
			List <SootClass> tgts = (c.isInterface()) ? hierarchy.getImplementersOf(c) : hierarchy.getSubclassesOf(c);
			for (SootClass tc : tgts) {
				if (!tc.declaresMethod(sign)) continue;
				try {
					SootMethod tm = tc.getMethod(sign);
					add_to_spytable(tm.getNumber(), def);
				} catch (RuntimeException e) {
					 e.printStackTrace(Out.getLog());
				}
			}
		// }
	}
}
 

开发者ID:Orange-OpenSource,
项目名称:matos-tool,
代码行数:30,
代码来源:ProgramSpy.java

示例4: getSubSignature

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
public NumberedString getSubSignature() {
    if( subsig == null ) {
        subsig = Scene.v().getSubSigNumberer().findOrAdd(
            SootMethod.getSubSignature( name, parameterTypes, returnType ));
    }
    return subsig;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:8,
代码来源:SootMethodRefImpl.java

示例5: addVirtualCallSite

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
private void addVirtualCallSite( Stmt s, SootMethod m, Local receiver,
        InstanceInvokeExpr iie, NumberedString subSig, Kind kind ) {
    List<VirtualCallSite> sites = (List<VirtualCallSite>) receiverToSites.get(receiver);
    if (sites == null) {
        receiverToSites.put(receiver, sites = new ArrayList<VirtualCallSite>());
        List<Local> receivers = (List<Local>) methodToReceivers.get(m);
        if( receivers == null )
            methodToReceivers.put(m, receivers = new ArrayList<Local>());
        receivers.add(receiver);
    }
    sites.add(new VirtualCallSite(s, m, iie, subSig, kind));
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:13,
代码来源:OnFlyCallGraphBuilder.java

示例6: isMain

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
/**
 * 
 * @return yes if this is the main method
 */
public boolean isMain()
{
	if ( isPublic() && isStatic() ) {
		NumberedString main_sig = Scene.v().getSubSigNumberer().findOrAdd( "void main(java.lang.String[])" );
		if ( main_sig.equals( subsignature ) )
			return true;
	}
	
	return false;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:15,
代码来源:SootMethod.java

示例7: getMethod

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
/**    
 * Returns the method of this class with the given subsignature. If no
 * method with the given subsignature can be found, an exception is thrown.
 */
public SootMethod getMethod(NumberedString subsignature)
{
    SootMethod ret = getMethodUnsafe(subsignature);
    if(ret == null)
        throw new RuntimeException("No method " + subsignature + " in class " + getName());
    else
        return ret;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:13,
代码来源:SootClass.java

示例8: getMethodUnsafe

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
/**    
 * Returns the method of this class with the given subsignature. If no
 * method with the given subsignature can be found, null is returned.
 */
public SootMethod getMethodUnsafe(NumberedString subsignature)
{
    checkLevel(SIGNATURES);
    SootMethod ret = subSigToMethods.get( subsignature );
    return ret;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:11,
代码来源:SootClass.java

示例9: declaresMethod

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
/**
 * Does this class declare a method with the given subsignature?
 */
public boolean declaresMethod(NumberedString subsignature)
{
    checkLevel(SIGNATURES);
    SootMethod ret = subSigToMethods.get( subsignature );
    return ret != null;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:10,
代码来源:SootClass.java

示例10: overridingMethodsFor

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
public static List<SootMethod> overridingMethodsFor(SootMethod originalMethod)
{
	List<SootClass> subTypes = subTypesOf(originalMethod.getDeclaringClass());
	List<SootMethod> overridingMeths = new ArrayList();
	NumberedString subsig = originalMethod.getNumberedSubSignature();
	for(SootClass st : subTypes){
		if(st.declaresMethod(subsig)){
			overridingMeths.add(st.getMethod(subsig));
		}
	}
	return overridingMeths;
}
 

开发者ID:petablox-project,
项目名称:petablox,
代码行数:13,
代码来源:SootUtils.java

示例11: addEdge

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
private void addEdge(  SootMethod src, Stmt stmt, SootClass cls, NumberedString methodSubSig, Kind kind ) {
	SootMethod sm = cls.getMethodUnsafe( methodSubSig );
    if( sm != null ) {
        addEdge( src, stmt, sm, kind );
    }
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:7,
代码来源:OnFlyCallGraphBuilder.java

示例12: getNumberedSubSignature

点赞 2

import soot.util.NumberedString; //导入依赖的package包/类
public NumberedString getNumberedSubSignature() {
    return subsignature;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:4,
代码来源:SootMethod.java

示例13: VirtualCallHandler

点赞 1

import soot.util.NumberedString; //导入依赖的package包/类
/**
 * @param pag
 * @param receiverType
 * @param methodName
 * @param parameterTypes
 * @param returnType
 */
public VirtualCallHandler(PAG pag, Type receiverType, NumberedString methodStr) {
  super();
  this.pag = pag;
  this.receiverType = receiverType;
  this.methodStr = methodStr;
}
 

开发者ID:flankerhqd,
项目名称:JAADAS,
代码行数:14,
代码来源:AllocationSiteHandler.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)