* A Case statement for a Switch.
* @author Matthieu Casanova
*/
-public class Case extends AbstractCase {
+public final class Case extends AbstractCase {
- public Expression value;
+ private final Expression value;
public Case(final Expression value,
final Statement[] statements,
/**
* get the modified variables.
- * @return the variables from we change value
+ *
+ * @param list the list where we will put variables
*/
- public List getModifiedVariable() {
- final List list = super.getModifiedVariable();
- list.addAll(value.getModifiedVariable());
- return list;
+ public void getModifiedVariable(final List list) {
+ super.getModifiedVariable(list);
+ value.getModifiedVariable(list);
}
/**
* Get the variables used.
- * @return the variables used
+ *
+ * @param list the list where we will put variables
*/
- public List getUsedVariable() {
- final List list = super.getUsedVariable();
- list.addAll(value.getUsedVariable());
- return list;
+ public void getUsedVariable(final List list) {
+ super.getUsedVariable(list);
+ value.getUsedVariable(list);
}
}