use of org.apache.xbean.asm6.Type in project openflowplugin by opendaylight.
the class OfToSalIcmpv4TypeCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull Icmpv4TypeCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final Icmpv4MatchBuilder icmpv4MatchBuilder = data.getIcmpv4MatchBuilder();
Icmpv4Type icmpv4Type = source.getIcmpv4Type();
Short type = icmpv4Type.getIcmpv4Type();
if (type != null) {
icmpv4MatchBuilder.setIcmpv4Type(type);
matchBuilder.setIcmpv4Match(icmpv4MatchBuilder.build());
}
return Optional.of(matchBuilder);
}
use of org.apache.xbean.asm6.Type in project component-runtime by Talend.
the class RepositoryModelBuilderTest method notRootConfig.
@Test
void notRootConfig() {
final RepositoryModel model = new RepositoryModelBuilder().create(new ComponentManager.AllServices(emptyMap()), singleton(new ComponentFamilyMeta("test", emptyList(), "noicon", "test", "test") {
{
final ParameterMeta store = new ParameterMeta(null, DataStore1.class, ParameterMeta.Type.OBJECT, "config.store", "store", new String[0], emptyList(), emptyList(), new HashMap<String, String>() {
{
put("tcomp::configurationtype::type", "datastore");
put("tcomp::configurationtype::name", "testDatastore");
}
});
final ParameterMeta wrapper = new ParameterMeta(null, WrappingStore.class, ParameterMeta.Type.OBJECT, "config", "config", new String[0], singletonList(store), emptyList(), emptyMap());
getPartitionMappers().put("test", new PartitionMapperMeta(this, "mapper", "noicon", 1, PartitionMapper1.class, singletonList(wrapper), m -> null, (a, b) -> null, true) {
});
}
}), new MigrationHandlerFactory(new ReflectionService(new ParameterModelService())));
final List<Config> configs = model.getFamilies().stream().flatMap(f -> f.getConfigs().stream()).collect(toList());
assertEquals(1, configs.size());
}
Aggregations