Added the ability to set custom methods instead of the auto-generated methods, and added custom methods for getActions/setActions in OFFlowMod implementation classes of version 1.3.
diff --git a/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
new file mode 100644
index 0000000..c3a42e3
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
@@ -0,0 +1,20 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+//:: if builder:
+ if (!this.instructionsSet)
+//:: if has_parent:
+ return parentMessage.getActions();
+//:: else:
+ return Collections.emptyList();
+//:: #endif
+//:: #endif
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java
new file mode 100644
index 0000000..725de24
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+ @Override
+ public OFFlowAdd.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowAddVer13_getActions.java b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
new file mode 100644
index 0000000..3b56d52
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
@@ -0,0 +1,12 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
new file mode 100644
index 0000000..c3a42e3
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
@@ -0,0 +1,20 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+//:: if builder:
+ if (!this.instructionsSet)
+//:: if has_parent:
+ return parentMessage.getActions();
+//:: else:
+ return Collections.emptyList();
+//:: #endif
+//:: #endif
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java
new file mode 100644
index 0000000..b2dafe5
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+ @Override
+ public OFFlowDeleteStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
new file mode 100644
index 0000000..3b56d52
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
@@ -0,0 +1,12 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
new file mode 100644
index 0000000..c3a42e3
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
@@ -0,0 +1,20 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+//:: if builder:
+ if (!this.instructionsSet)
+//:: if has_parent:
+ return parentMessage.getActions();
+//:: else:
+ return Collections.emptyList();
+//:: #endif
+//:: #endif
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java
new file mode 100644
index 0000000..5576aaa
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+ @Override
+ public OFFlowDelete.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
new file mode 100644
index 0000000..3b56d52
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
@@ -0,0 +1,12 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
new file mode 100644
index 0000000..c3a42e3
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
@@ -0,0 +1,20 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+//:: if builder:
+ if (!this.instructionsSet)
+//:: if has_parent:
+ return parentMessage.getActions();
+//:: else:
+ return Collections.emptyList();
+//:: #endif
+//:: #endif
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java
new file mode 100644
index 0000000..fc04079
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+ @Override
+ public OFFlowModifyStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
new file mode 100644
index 0000000..3b56d52
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
@@ -0,0 +1,12 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
new file mode 100644
index 0000000..c3a42e3
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
@@ -0,0 +1,20 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+//:: if builder:
+ if (!this.instructionsSet)
+//:: if has_parent:
+ return parentMessage.getActions();
+//:: else:
+ return Collections.emptyList();
+//:: #endif
+//:: #endif
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java
new file mode 100644
index 0000000..695b771
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+ @Override
+ public OFFlowModify.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+ OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
+ builder.setActions(actions);
+ this.instructions = Collections.singletonList((OFInstruction)builder.build());
+ this.instructionsSet = true;
+ return this;
+ }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
new file mode 100644
index 0000000..3b56d52
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
@@ -0,0 +1,12 @@
+
+ @Override
+ public List<OFAction> getActions()throws UnsupportedOperationException {
+ ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
+ for (OFInstruction inst : this.instructions) {
+ if (inst instanceof OFInstructionApplyActions) {
+ OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
+ builder.addAll(iap.getActions());
+ }
+ }
+ return builder.build();
+ }
\ No newline at end of file