@Test public void testExtensionMethod() { final Instruction instruction = Instructions.extension(extensionTreatment1, deviceId1); final Instructions.ExtensionInstructionWrapper extensionInstructionWrapper = checkAndConvert(instruction, Instruction.Type.EXTENSION, Instructions.ExtensionInstructionWrapper.class); assertThat(extensionInstructionWrapper.deviceId(), is(deviceId1)); assertThat(extensionInstructionWrapper.extensionInstruction(), is(extensionTreatment1)); }
public static ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId) { checkNotNull(extension, "Extension instruction cannot be null"); checkNotNull(deviceId, "Device ID cannot be null"); return new ExtensionInstructionWrapper(extension, deviceId); }
Instructions { public static ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId) { checkNotNull(extension, "Extension instruction cannot be null"); checkNotNull(deviceId, "Device ID cannot be null"); return new ExtensionInstructionWrapper(extension, deviceId); } }
Instructions { public static ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId) { checkNotNull(extension, "Extension instruction cannot be null"); checkNotNull(deviceId, "Device ID cannot be null"); return new ExtensionInstructionWrapper(extension, deviceId); } private  Instructions(); }
Instructions { public static ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId) { checkNotNull(extension, "Extension instruction cannot be null"); checkNotNull(deviceId, "Device ID cannot be null"); return new ExtensionInstructionWrapper(extension, deviceId); } private  Instructions(); static OutputInstruction createOutput(final PortNumber number); static NoActionInstruction createNoAction(); static GroupInstruction createGroup(final GroupId groupId); static SetQueueInstruction setQueue(final long queueId, final PortNumber port); static MeterInstruction meterTraffic(final MeterId meterId); static L0ModificationInstruction modL0Lambda(Lambda lambda); static L1ModificationInstruction modL1OduSignalId(OduSignalId oduSignalId); static L2ModificationInstruction modL2Src(MacAddress addr); static L2ModificationInstruction modL2Dst(MacAddress addr); static L2ModificationInstruction modVlanId(VlanId vlanId); static L2ModificationInstruction modVlanPcp(Byte vlanPcp); static L2ModificationInstruction modMplsLabel(MplsLabel mplsLabel); static L2ModificationInstruction modMplsBos(boolean mplsBos); static L2ModificationInstruction decMplsTtl(); static L3ModificationInstruction modL3Src(IpAddress addr); static L3ModificationInstruction modL3Dst(IpAddress addr); static L3ModificationInstruction modL3IPv6Src(IpAddress addr); static L3ModificationInstruction modL3IPv6Dst(IpAddress addr); static L3ModificationInstruction modL3IPv6FlowLabel(int flowLabel); static L3ModificationInstruction decNwTtl(); static L3ModificationInstruction copyTtlOut(); static L3ModificationInstruction copyTtlIn(); static L3ModificationInstruction modArpSpa(IpAddress addr); static L3ModificationInstruction modArpSha(MacAddress addr); static L3ModificationInstruction modL3ArpOp(short op); static Instruction pushMpls(); static Instruction popMpls(); static Instruction popMpls(EthType etherType); static Instruction popVlan(); static Instruction pushVlan(); static Instruction transition(Integer tableId); static Instruction writeMetadata(long metadata, long metadataMask); static L2ModificationInstruction modTunnelId(long tunnelId); static L4ModificationInstruction modTcpSrc(TpPort port); static L4ModificationInstruction modTcpDst(TpPort port); static L4ModificationInstruction modUdpSrc(TpPort port); static L4ModificationInstruction modUdpDst(TpPort port); static ExtensionInstructionWrapper extension(ExtensionTreatment extension,
                                                        DeviceId deviceId); }
Instructions { public static ExtensionInstructionWrapper extension(ExtensionTreatment extension, DeviceId deviceId) { checkNotNull(extension, "Extension instruction cannot be null"); checkNotNull(deviceId, "Device ID cannot be null"); return new ExtensionInstructionWrapper(extension, deviceId); } private  Instructions(); static OutputInstruction createOutput(final PortNumber number); static NoActionInstruction createNoAction(); static GroupInstruction createGroup(final GroupId groupId); static SetQueueInstruction setQueue(final long queueId, final PortNumber port); static MeterInstruction meterTraffic(final MeterId meterId); static L0ModificationInstruction modL0Lambda(Lambda lambda); static L1ModificationInstruction modL1OduSignalId(OduSignalId oduSignalId); static L2ModificationInstruction modL2Src(MacAddress addr); static L2ModificationInstruction modL2Dst(MacAddress addr); static L2ModificationInstruction modVlanId(VlanId vlanId); static L2ModificationInstruction modVlanPcp(Byte vlanPcp); static L2ModificationInstruction modMplsLabel(MplsLabel mplsLabel); static L2ModificationInstruction modMplsBos(boolean mplsBos); static L2ModificationInstruction decMplsTtl(); static L3ModificationInstruction modL3Src(IpAddress addr); static L3ModificationInstruction modL3Dst(IpAddress addr); static L3ModificationInstruction modL3IPv6Src(IpAddress addr); static L3ModificationInstruction modL3IPv6Dst(IpAddress addr); static L3ModificationInstruction modL3IPv6FlowLabel(int flowLabel); static L3ModificationInstruction decNwTtl(); static L3ModificationInstruction copyTtlOut(); static L3ModificationInstruction copyTtlIn(); static L3ModificationInstruction modArpSpa(IpAddress addr); static L3ModificationInstruction modArpSha(MacAddress addr); static L3ModificationInstruction modL3ArpOp(short op); static Instruction pushMpls(); static Instruction popMpls(); static Instruction popMpls(EthType etherType); static Instruction popVlan(); static Instruction pushVlan(); static Instruction transition(Integer tableId); static Instruction writeMetadata(long metadata, long metadataMask); static L2ModificationInstruction modTunnelId(long tunnelId); static L4ModificationInstruction modTcpSrc(TpPort port); static L4ModificationInstruction modTcpDst(TpPort port); static L4ModificationInstruction modUdpSrc(TpPort port); static L4ModificationInstruction modUdpDst(TpPort port); static ExtensionInstructionWrapper extension(ExtensionTreatment extension,
                                                        DeviceId deviceId);  }