All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openl.rules.model.scaffolding.MethodModel Maven / Gradle / Ivy

There is a newer version: 5.27.8.1
Show newest version
package org.openl.rules.model.scaffolding;

import java.util.List;

public interface MethodModel extends Model {

    PathInfo getPathInfo();

    String getType();

    List getParameters();

    boolean isInclude();

    void setInclude(boolean include);

    default String getMethodFilterPattern() {
        StringBuilder builder = new StringBuilder(".+ ")
                .append(getPathInfo().getFormattedPath())
                .append("\\(");
        if (!getParameters().isEmpty()) {
            builder.append(".+");
        } else if (getPathInfo().getRuntimeContextParameter() != null) {
            builder.append(".*");
        }
        builder.append("\\)");

        return builder.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy