tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3662 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
c77ddd3dd4
commit
7093e8fac6
|
@ -42,8 +42,6 @@ import com.ibm.wala.util.warnings.Warning;
|
|||
|
||||
/**
|
||||
* An abstract superclass of various {@link SSAContextInterpreter}s that deal with reflection methods.
|
||||
*
|
||||
* @author pistoia
|
||||
*/
|
||||
public abstract class AbstractReflectionInterpreter implements SSAContextInterpreter {
|
||||
|
||||
|
|
|
@ -20,10 +20,7 @@ import com.ibm.wala.ssa.SSAInstruction.Visitor;
|
|||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* A mapping from CallSiteReference to SSA InvokeInstruction.
|
||||
*
|
||||
* @author sfink
|
||||
* A mapping from {@link CallSiteReference} to {@link SSAInvokeInstruction}
|
||||
*/
|
||||
public class CallSiteMap {
|
||||
|
||||
|
@ -33,7 +30,6 @@ public class CallSiteMap {
|
|||
private final Map<CallSiteReference, SSAInvokeInstruction> map = HashMapFactory.make();
|
||||
|
||||
/**
|
||||
* @param ir
|
||||
* @throws IllegalArgumentException if ir is null
|
||||
*/
|
||||
public CallSiteMap(final IR ir) {
|
||||
|
@ -56,7 +52,6 @@ public class CallSiteMap {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param site
|
||||
* @return the InvokeInstruction corresponding to the call site.
|
||||
*/
|
||||
public SSAInvokeInstruction getInstructionForSite(CallSiteReference site) {
|
||||
|
|
|
@ -22,8 +22,6 @@ import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
|
|||
|
||||
/**
|
||||
* A {@link ContextSelector} to intercept calls to Class.newInstance()
|
||||
*
|
||||
* @author pistoia
|
||||
*/
|
||||
class ClassNewInstanceContextSelector implements ContextSelector {
|
||||
|
||||
|
|
|
@ -22,12 +22,9 @@ import com.ibm.wala.ipa.callgraph.propagation.cfa.CallStringContext;
|
|||
|
||||
/**
|
||||
* For synthetic methods marked as "Factories", we analyze in a context defined by the caller.
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
class FactoryContextSelector implements ContextSelector {
|
||||
|
||||
|
||||
public FactoryContextSelector() {
|
||||
}
|
||||
|
||||
|
|
|
@ -21,20 +21,17 @@ import com.ibm.wala.types.MethodReference;
|
|||
import com.ibm.wala.types.TypeReference;
|
||||
|
||||
/**
|
||||
* A {@link ContextSelector} to intercept calls to Object.getClass()
|
||||
*
|
||||
* @author sjfink
|
||||
* A {@link ContextSelector} to intercept calls to Object.getClass()
|
||||
*/
|
||||
class GetClassContextSelector implements ContextSelector {
|
||||
|
||||
public final static MethodReference GET_CLASS = MethodReference.findOrCreate(TypeReference.JavaLangObject, "getClass", "()Ljava/lang/Class;");
|
||||
|
||||
public final static MethodReference GET_CLASS = MethodReference.findOrCreate(TypeReference.JavaLangObject, "getClass",
|
||||
"()Ljava/lang/Class;");
|
||||
|
||||
public GetClassContextSelector() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
/*
|
||||
* @see com.ibm.wala.ipa.callgraph.ContextSelector#getCalleeTarget(com.ibm.wala.ipa.callgraph.CGNode,
|
||||
* com.ibm.wala.classLoader.CallSiteReference, com.ibm.wala.classLoader.IMethod,
|
||||
* com.ibm.wala.ipa.callgraph.propagation.InstanceKey)
|
||||
|
|
|
@ -14,10 +14,7 @@ import com.ibm.wala.ipa.callgraph.Context;
|
|||
import com.ibm.wala.ipa.callgraph.ContextItem;
|
||||
import com.ibm.wala.ipa.callgraph.ContextKey;
|
||||
|
||||
/**
|
||||
* @author fink
|
||||
* @author pistoia
|
||||
*/
|
||||
|
||||
public class IllegalArgumentExceptionContext implements Context {
|
||||
|
||||
public ContextItem get(ContextKey name) {
|
||||
|
|
|
@ -15,8 +15,6 @@ import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
|
|||
|
||||
/**
|
||||
* An instance key which has an associated {@link CGNode}.
|
||||
*
|
||||
* @author sfink
|
||||
*/
|
||||
public interface InstanceKeyWithNode extends InstanceKey {
|
||||
|
||||
|
|
|
@ -58,9 +58,6 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
* <li>getDeclaredMethod
|
||||
* <li>getDeclaredMethods
|
||||
* </ul>
|
||||
*
|
||||
* @author pistoia
|
||||
* @author sfink
|
||||
*/
|
||||
public class JavaLangClassContextInterpreter implements SSAContextInterpreter {
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.ibm.wala.types.FieldReference;
|
|||
|
||||
/**
|
||||
* {@link SSAContextInterpreter} to handle all reflection procession.
|
||||
*
|
||||
*/
|
||||
public class ReflectionContextInterpreter {
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
|
|||
|
||||
/**
|
||||
* A {@link ContextSelector} to handle default reflection logic.
|
||||
*
|
||||
* @author sjfink
|
||||
*/
|
||||
public class ReflectionContextSelector {
|
||||
|
||||
|
|
|
@ -26,11 +26,7 @@ import com.ibm.wala.ssa.SymbolTable;
|
|||
import com.ibm.wala.types.TypeReference;
|
||||
|
||||
/**
|
||||
* A {@link ContextSelector} to intercept calls to reflective method invocations such as Constructor.newInstance and
|
||||
* Method.invoke
|
||||
*
|
||||
* @author pistoia
|
||||
* @author sjfink
|
||||
* A {@link ContextSelector} to intercept calls to reflective method invocations such as Constructor.newInstance and Method.invoke
|
||||
*/
|
||||
class ReflectiveInvocationSelector implements ContextSelector {
|
||||
|
||||
|
@ -40,12 +36,12 @@ class ReflectiveInvocationSelector implements ContextSelector {
|
|||
/**
|
||||
* Creates a callee target based on the following criteria:
|
||||
* <ol>
|
||||
* <li> If the method being invoked through reflection is definitely static, then do not create a callee target for
|
||||
* any <code>callee</code> method that is not static. In this case, return <code>null</code>.
|
||||
* <li> If the method being invoked through reflection takes a constant number of parameters, <code>n</code>, then
|
||||
* do not create a callee target for any <code>callee</code> method that takes a number of parameters different from
|
||||
* <code>n</code>. In this case, return <code>null</code>.
|
||||
* <li> Otherwise, return a new {@link ReceiverInstanceContext} for <code>receiver</code>.
|
||||
* <li>If the method being invoked through reflection is definitely static, then do not create a callee target for any
|
||||
* <code>callee</code> method that is not static. In this case, return <code>null</code>.
|
||||
* <li>If the method being invoked through reflection takes a constant number of parameters, <code>n</code>, then do not create a
|
||||
* callee target for any <code>callee</code> method that takes a number of parameters different from <code>n</code>. In this case,
|
||||
* return <code>null</code>.
|
||||
* <li>Otherwise, return a new {@link ReceiverInstanceContext} for <code>receiver</code>.
|
||||
* </ol>
|
||||
*/
|
||||
public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey receiver) {
|
||||
|
|
Loading…
Reference in New Issue