package click.kamil.springstatemachineexporter.analysis.index;

public record AccessorSummary(
        String ownerFqn,
        String methodName,
        AccessorKind kind,
        String fieldName,
        String paramName,
        String declaringFqn,
        boolean returnsThis
) {
    public boolean isGetter() {
        return kind == AccessorKind.GETTER
                || kind == AccessorKind.BOOLEAN_GETTER
                || kind == AccessorKind.CONSTANT_GETTER
                || kind == AccessorKind.RECORD_COMPONENT;
    }

    public boolean isSetter() {
        return kind == AccessorKind.SETTER || kind == AccessorKind.FLUENT_SETTER;
    }
}
