ThemisSolverMethod.java

/*
 * Themis: Java Project Framework
 * Copyright 2012-2026. Tony Washer
 *
 * 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 io.github.tonywasher.joceanus.themis.solver.proj;

import io.github.tonywasher.joceanus.themis.parser.base.ThemisInstance.ThemisMethodInstance;
import io.github.tonywasher.joceanus.themis.solver.proj.ThemisSolverDef.ThemisSolverClassDef;
import io.github.tonywasher.joceanus.themis.solver.proj.ThemisSolverDef.ThemisSolverMethodDef;

/**
 * Solver Method.
 */
public class ThemisSolverMethod
        implements ThemisSolverMethodDef {
    /**
     * The owning class.
     */
    private final ThemisSolverClassDef theClass;

    /**
     * The contained method.
     */
    private final ThemisMethodInstance theMethod;

    /**
     * Constructor.
     *
     * @param pClass  the owning class
     * @param pMethod the parsed method
     */
    ThemisSolverMethod(final ThemisSolverClassDef pClass,
                       final ThemisMethodInstance pMethod) {
        /* Store the parameters */
        theClass = pClass;
        theMethod = pMethod;
    }

    @Override
    public ThemisSolverClassDef getOwningClass() {
        return theClass;
    }

    @Override
    public ThemisMethodInstance getUnderlyingMethod() {
        return theMethod;
    }
}