Search in sources :

Example 1 with Converter

use of org.springframework.shell.core.Converter in project geode by apache.

the class GfshParserConverterTest method spyConverter.

private static <T extends Converter> T spyConverter(Class<T> klass) {
    Set<Converter<?>> converters = parser.getConverters();
    T foundConverter = null, spy = null;
    for (Converter converter : converters) {
        if (klass.isAssignableFrom(converter.getClass())) {
            foundConverter = (T) converter;
            break;
        }
    }
    if (foundConverter != null) {
        parser.remove(foundConverter);
        spy = spy(foundConverter);
        parser.add(spy);
    }
    return spy;
}
Also used : FilePathConverter(org.apache.geode.management.internal.cli.converters.FilePathConverter) RegionPathConverter(org.apache.geode.management.internal.cli.converters.RegionPathConverter) Converter(org.springframework.shell.core.Converter) DiskStoreNameConverter(org.apache.geode.management.internal.cli.converters.DiskStoreNameConverter) FilePathStringConverter(org.apache.geode.management.internal.cli.converters.FilePathStringConverter)

Aggregations

DiskStoreNameConverter (org.apache.geode.management.internal.cli.converters.DiskStoreNameConverter)1 FilePathConverter (org.apache.geode.management.internal.cli.converters.FilePathConverter)1 FilePathStringConverter (org.apache.geode.management.internal.cli.converters.FilePathStringConverter)1 RegionPathConverter (org.apache.geode.management.internal.cli.converters.RegionPathConverter)1 Converter (org.springframework.shell.core.Converter)1