com.togethersoft.sca.dataflow
Interface IKnownMethod


public interface IKnownMethod

Represents a library method. In comparison with ordinary methods, library methods may have additional information that is used during data flow analysis. This information includes:


Method Summary
 com.togethersoft.sca.dataflow.values.IValueDomain getParameterValue(int arg)
          Returns valid value domain for the formal parameter with the specifed number.
 com.togethersoft.sca.dataflow.values.IValueDomain getReturnValue()
          Returns value domain for the return values.
 boolean hasSideEffect()
          Returns true if this method has side effects, that is changes the state of any object.
 

Method Detail

getParameterValue

public com.togethersoft.sca.dataflow.values.IValueDomain getParameterValue(int arg)
Returns valid value domain for the formal parameter with the specifed number.

For example, the index parameter for String.charat(int index) may not be negative.

Parameters:
arg - the number of the formal parameter. Parameters are counted starting with zero.

getReturnValue

public com.togethersoft.sca.dataflow.values.IValueDomain getReturnValue()
Returns value domain for the return values.

For example, ArrayList.size() returns non-negative values only.


hasSideEffect

public boolean hasSideEffect()
Returns true if this method has side effects, that is changes the state of any object.

For example, String.length() does not have side effects, but PrintStream.println() does.