Skip to content

Commit 2296eee

Browse files
committed
Made copy function public
1 parent 9ae0b47 commit 2296eee

32 files changed

+66
-59
lines changed

src/main/java/de/rub/nds/modifiablevariable/VariableModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public E modify(E input) {
106106
}
107107

108108
protected abstract E modifyImplementationHook(E input);
109-
110-
protected abstract VariableModification<E> getModifiedCopy();
109+
110+
public abstract VariableModification<E> getModifiedCopy();
111111

112112
/**
113113
* Debugging modified variables. Getting stack trace can be time consuming,

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerAddModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import javax.xml.bind.annotation.XmlType;
1616

1717
@XmlRootElement
18-
@XmlType(propOrder = {"summand", "modificationFilter", "postModification"})
18+
@XmlType(propOrder = { "summand", "modificationFilter", "postModification" })
1919
public class BigIntegerAddModification extends VariableModification<BigInteger> {
2020

2121
private BigInteger summand;
@@ -42,7 +42,7 @@ public void setSummand(BigInteger summand) {
4242
}
4343

4444
@Override
45-
protected VariableModification<BigInteger> getModifiedCopy() {
45+
public VariableModification<BigInteger> getModifiedCopy() {
4646
return new BigIntegerAddModification(summand.add(new BigInteger(8, new Random())));
4747
}
4848
}

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerExplicitValueModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import javax.xml.bind.annotation.XmlType;
1616

1717
@XmlRootElement
18-
@XmlType(propOrder = {"explicitValue", "modificationFilter", "postModification"})
18+
@XmlType(propOrder = { "explicitValue", "modificationFilter", "postModification" })
1919
public class BigIntegerExplicitValueModification extends VariableModification<BigInteger> {
2020

2121
private BigInteger explicitValue;
@@ -41,7 +41,7 @@ public void setExplicitValue(BigInteger explicitValue) {
4141
}
4242

4343
@Override
44-
protected VariableModification<BigInteger> getModifiedCopy() {
44+
public VariableModification<BigInteger> getModifiedCopy() {
4545
Random r = new Random();
4646
if (r.nextBoolean()) {
4747
return new BigIntegerExplicitValueModification(explicitValue.add(new BigInteger(8, r)));

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerInteractiveModification.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ public interface InteractiveBigIntegerModification {
3838
}
3939

4040
@Override
41-
protected VariableModification<BigInteger> getModifiedCopy() {
41+
public VariableModification<BigInteger> getModifiedCopy() {
4242
throw new UnsupportedOperationException("This method is not supported for interactive Modifactions");
4343
}
44-
45-
44+
4645
}

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerShiftLeftModification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void setShift(int shift) {
4545
}
4646

4747
@Override
48-
protected VariableModification<BigInteger> getModifiedCopy() {
48+
public VariableModification<BigInteger> getModifiedCopy() {
4949
return new BigIntegerShiftLeftModification(shift + new Random().nextInt(32));
5050
}
5151
}

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerShiftRightModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public int getShift() {
4343
public void setShift(int shift) {
4444
this.shift = shift;
4545
}
46-
46+
4747
@Override
48-
protected VariableModification<BigInteger> getModifiedCopy() {
48+
public VariableModification<BigInteger> getModifiedCopy() {
4949
return new BigIntegerShiftRightModification(shift + new Random().nextInt(32));
5050
}
5151
}

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerSubtractModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public BigInteger getSubtrahend() {
4343
public void setSubtrahend(BigInteger subtrahend) {
4444
this.subtrahend = subtrahend;
4545
}
46-
46+
4747
@Override
48-
protected VariableModification<BigInteger> getModifiedCopy() {
48+
public VariableModification<BigInteger> getModifiedCopy() {
4949
return new BigIntegerSubtractModification(subtrahend.add(new BigInteger(8, new Random())));
5050
}
5151
}

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerXorModification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void setXor(BigInteger xor) {
4545
}
4646

4747
@Override
48-
protected VariableModification<BigInteger> getModifiedCopy() {
48+
public VariableModification<BigInteger> getModifiedCopy() {
4949
return new BigIntegerXorModification(xor.add(new BigInteger(8, new Random())));
5050
}
5151
}

src/main/java/de/rub/nds/modifiablevariable/bool/BooleanExplicitValueModification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void setExplicitValue(boolean explicitValue) {
3939
}
4040

4141
@Override
42-
protected VariableModification<Boolean> getModifiedCopy() {
42+
public VariableModification<Boolean> getModifiedCopy() {
4343
return new BooleanExplicitValueModification(!explicitValue);
4444
}
4545
}

src/main/java/de/rub/nds/modifiablevariable/bool/BooleanToogleModification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import javax.xml.bind.annotation.XmlType;
1414

1515
@XmlRootElement
16-
@XmlType(propOrder = {"modificationFilter", "postModification"})
16+
@XmlType(propOrder = { "modificationFilter", "postModification" })
1717
public class BooleanToogleModification extends VariableModification<Boolean> {
1818

1919
public BooleanToogleModification() {
@@ -28,7 +28,7 @@ protected Boolean modifyImplementationHook(Boolean input) {
2828
}
2929

3030
@Override
31-
protected VariableModification<Boolean> getModifiedCopy() {
31+
public VariableModification<Boolean> getModifiedCopy() {
3232
return new BooleanToogleModification();
3333
}
3434
}

0 commit comments

Comments
 (0)