io.deephaven.engine.table.lang.impl.QueryLibraryImportsConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.engine.table.lang.impl;
import com.google.auto.service.AutoService;
import io.deephaven.configuration.Configuration;
import io.deephaven.engine.context.QueryLibraryImports;
import io.deephaven.engine.util.ClassList;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
@AutoService(QueryLibraryImports.class)
public class QueryLibraryImportsConfiguration implements QueryLibraryImports {
@Override
public Set packages() {
try {
return new HashSet<>(ClassList
.readPackageList(Configuration.getInstance().getProperty("QueryLibrary.defaultPackageImportList")));
} catch (IOException e) {
throw new RuntimeException("Can not load default class imports", e);
}
}
@Override
public Set> classes() {
try {
return new HashSet<>(ClassList.readClassListAsCollection(
Configuration.getInstance().getProperty("QueryLibrary.defaultClassImportList")));
} catch (IOException | ClassNotFoundException e) {
throw new RuntimeException("Can not load default class imports", e);
}
}
@Override
public Set> statics() {
try {
return new HashSet<>(ClassList.readClassListAsCollection(
Configuration.getInstance().getProperty("QueryLibrary.defaultStaticImportList")));
} catch (IOException | ClassNotFoundException e) {
throw new RuntimeException("Can not load default static imports", e);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy