public class ArrayStatement extends AbstractStatement
AbstractStatement.Executerassertions, comment, logger, retval, tc| Constructor and Description |
|---|
ArrayStatement(TestCase tc,
ArrayReference arrayReference)
Constructor for ArrayStatement.
|
ArrayStatement(TestCase tc,
ArrayReference arrayReference,
int[] length)
Constructor for ArrayStatement.
|
ArrayStatement(TestCase tc,
Type type)
Constructor for ArrayStatement.
|
ArrayStatement(TestCase tc,
Type type,
int length)
Constructor for ArrayStatement.
|
ArrayStatement(TestCase tc,
Type type,
int[] length)
Constructor for ArrayStatement.
|
| Modifier and Type | Method and Description |
|---|---|
Statement |
copy(TestCase newTestCase,
int offset)
copy
|
static int |
determineDimensions(Type type)
determineDimensions
|
boolean |
equals(Object s)
Equality check
|
Throwable |
execute(Scope scope,
PrintStream out)
This method executes the statement under the given scope.
|
GenericAccessibleObject<?> |
getAccessibleObject()
Returns the accessibleObject which is used to generate this kind of
statement E.g.
|
ArrayReference |
getArrayReference() |
List<Integer> |
getLengths()
Getter for the field
lengths. |
List<VariableReference> |
getUniqueVariableReferences()
getUniqueVariableReferences
|
Set<VariableReference> |
getVariableReferences()
getVariableReferences
|
int |
hashCode()
Generate hash code
|
boolean |
isAssignmentStatement()
Returns true if this statement should be handled as an
AssignmentStatement.
|
boolean |
isValid()
Various consistency checks.
|
boolean |
mutate(TestCase test,
TestFactory factory)
mutate
|
void |
replace(VariableReference var1,
VariableReference var2)
Replace a VariableReference with another one
|
boolean |
same(Statement s)
Allows the comparing of Statements between TestCases.
|
void |
setLengths(int[] lengths)
Setter for the field
lengths. |
void |
setSize(int size)
setSize
|
int |
size()
size
|
addAssertion, addComment, changeClassLoader, clone, clone, copyAssertions, exceptionHandler, getAssertionCode, getAssertionReferences, getAssertions, getCode, getCode, getComment, getDeclaredExceptions, getExceptionClass, getNumParameters, getPosition, getReturnClass, getReturnType, getReturnValue, getTestCase, hasAssertions, isAccessible, isDeclaredException, isReflectionStatement, negate, references, removeAssertion, removeAssertions, setAssertions, setRetvalpublic ArrayStatement(TestCase tc, ArrayReference arrayReference)
Constructor for ArrayStatement.
tc - a TestCase object.arrayReference - a ArrayReference object.public ArrayStatement(TestCase tc, ArrayReference arrayReference, int[] length)
Constructor for ArrayStatement.
tc - a TestCase object.arrayReference - a ArrayReference object.length - an array of int.public ArrayStatement(TestCase tc, Type type, int length)
Constructor for ArrayStatement.
public static int determineDimensions(Type type)
determineDimensions
type - a Type object.public Statement copy(TestCase newTestCase, int offset)
copy
newTestCase - the testcase in which this statement will be insertedoffset - a int.Statement object.public boolean equals(Object s)
public Throwable execute(Scope scope, PrintStream out) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException
scope - the scope under which the statement is executedout - a PrintStream object.InvocationTargetException - if any.IllegalArgumentException - if any.IllegalAccessException - if any.InstantiationException - if any.public GenericAccessibleObject<?> getAccessibleObject()
AccessibleObject object.public List<Integer> getLengths()
Getter for the field lengths.
public List<VariableReference> getUniqueVariableReferences()
getUniqueVariableReferences
List object.public Set<VariableReference> getVariableReferences()
getVariableReferences
Set object.public int hashCode()
public boolean isAssignmentStatement()
public boolean isValid()
isValid in interface StatementisValid in class AbstractStatementpublic boolean mutate(TestCase test, TestFactory factory)
mutate
mutate in interface Statementmutate in class AbstractStatementtest - a TestCase object.factory - a TestFactory object.public void replace(VariableReference var1, VariableReference var2)
var1 - The old variablevar2 - The new variablepublic boolean same(Statement s)
s - a Statement object.public void setLengths(int[] lengths)
Setter for the field lengths.
lengths - an array of int.public void setSize(int size)
setSize
size - a int.public int size()
size
public ArrayReference getArrayReference()
Copyright © 2010–2017 EvoSuite. All rights reserved.