/*
 * Copyright 2017-2020 Micro Focus or one of its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hpe.caf.worker.emailsegregation;

import jep.ClassEnquirer;

/**
 *  Implementation of the ClassEnquirer interface for Jep.
 *  Any Packages beginning "io" or "re" will be passed to this
 *  implementation to decide whether it is a Java or Python
 *  package.
 *
 *  This will need to be expanded if packages other than Dropwizard are
 *  added to the classpath.
 */
public class ClassEnquirerImpl implements ClassEnquirer {

    /**
     * Checks if the package is for Java.
     * @param name The name of the package to import.
     * @return True if a Java Package.
     */
    @Override
    public boolean isJavaPackage(String name) {
        return name.contains("dropwizard");
    }

    @Override
    public String[] getClassNames(String pkgName) {
        return new String[0];
    }

    @Override
    public String[] getSubPackages(String pkgName) {
        return new String[0];
    }

}
