Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
package jp.osscons.opensourcecobol.libcobj;

/** TODO: 準備中 */
public class Const {
public final class Const {

/** このクラスはインスタンス化しない。 */
private Const() {}

/** TODO: 準備中 */
public static final String version = "2.0.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException;

/** 動的にクラスファイルを読み込んでCALL文のような機能を実装するためのクラス */
public class CobolResolve {
public final class CobolResolve {

/** このクラスはインスタンス化しない。 */
private CobolResolve() {}

/** プログラム名とCobolRunnableインスタンスの対応表 */
private static Map<String, CobolRunnable> callTable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException;

/** 組み込み関数を提供するクラス */
public class CobolSystemRoutine {
public final class CobolSystemRoutine {
/** このクラスはインスタンス化しない。 */
private CobolSystemRoutine() {}

private static final boolean runsOnWindows = "\\".equals(System.getProperty("file.separator"));

/**
Expand Down Expand Up @@ -138,6 +141,7 @@ public static int SYSTEM(AbstractCobolField cmd) {
* opensource COBOLのlibcob/common.cのcob_acuw_sleep関数に相当する
*
* @param data C$SLEEPの引数として指定されたCOBOL変数のバイト列。
* @return 常に0(正常終了を表す戻り値)。
*/
@SuppressWarnings("PMD.AvoidDollarSigns")
public static int C$SLEEP(CobolDataStorage data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
* libcobのcob_call_paramsに対応し、USING句で渡された実引数の個数を表す。<br>
* 呼び出されたプログラム側でこの値を参照することで、省略された引数の判定などに利用する。
*/
public class CobolCallParams {
public final class CobolCallParams {
/** このクラスはインスタンス化しない。 */
private CobolCallParams() {}

/** CALL文で渡された引数の個数 */
public static int callParams = 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
* 表(OCCURS)の添字や、OCCURS DEPENDING ONの可変回数が範囲内にあるかを検査する。<br>
* 範囲外の場合は{@link CobolExceptionId#COB_EC_BOUND_SUBSCRIPT}を設定し、実行時エラーを出力して実行を中止する。
*/
public class CobolCheck {
public final class CobolCheck {
/** このクラスはインスタンス化しない。 */
private CobolCheck() {}

/**
* 表の添字が指定された範囲内にあるかを検査する。<br>
* 範囲外の場合は例外を設定し、実行時エラーメッセージを出力して実行を中止する。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
* ZERO・SPACE・HIGH-VALUE・LOW-VALUE・QUOTEなどの形象定数や、それらの全角(ZEN)版、
* 各種バッファサイズ、10のべき乗表などをまとめて定義する。
*/
public class CobolConstant {
public final class CobolConstant {
/** このクラスはインスタンス化しない。 */
private CobolConstant() {}

/** 英数字のALL定数(SPACE・ZEROなどの形象定数)に用いる属性 */
public static final CobolFieldAttribute allAttr =
new CobolFieldAttribute(CobolFieldAttribute.COB_TYPE_ALPHANUMERIC_ALL, 0, 0, 0, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
* {@link #all(AbstractCobolField, AbstractCobolField)}などで計数・置換を行い、最後に{@link #finish()}で確定する
* という手順で実行する。
*/
public class CobolInspect {
public final class CobolInspect {
/** このクラスはインスタンス化しない。 */
private CobolInspect() {}

/** 一致する文字をすべて対象とする(INSPECT ... ALLに対応) */
private static final int INSPECT_ALL = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
* 各組み込み関数を、{@code funcXxx}という名前の静的メソッドとして提供する。<br>
* 各メソッドは計算結果を{@link AbstractCobolField}として返す。
*/
public class CobolIntrinsic {
public final class CobolIntrinsic {

/** このクラスはインスタンス化しない。 */
private CobolIntrinsic() {}

/** 各月初日までの通日(非うるう年)。インデックスは月(0〜12)。 */
private static int[] normalDays = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class Dlm {
*
* @see AbstractCobolField
*/
public class CobolString {
public final class CobolString {
/** このクラスはインスタンス化しない。 */
private CobolString() {}

/** UNSTRING文の区切り文字リストの既定の確保数。 */
private static final int DLM_DEFAULT_NUM = 8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
* ランタイムエラーの報告、SWITCHの設定・取得、参照修飾(reference modification)の境界チェック、<br>
* 文字列比較などのヘルパー処理をまとめて提供する。
*/
public class CobolUtil {
public final class CobolUtil {
/** このクラスはインスタンス化しない。 */
private CobolUtil() {}

/** I/O操作でREWRITEを暗黙的に行うとみなすかどうかのフラグ(環境変数COB_IO_ASSUME_REWRITEで設定)。 */
private static boolean cob_io_assume_rewrite = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
import jp.osscons.opensourcecobol.libcobj.exceptions.CobolRuntimeException;

/** AbstractCobolFieldのサブクラスを生成するためのメソッドを定義するクラス */
public class CobolFieldFactory {
public final class CobolFieldFactory {

/** このクラスはインスタンス化しない。 */
private CobolFieldFactory() {}

/**
* 引数に応じて適切なAbstractCobolFieldクラスのサブクラスを生成する.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
package jp.osscons.opensourcecobol.libcobj.exceptions;

/** 例外コードを定義するクラス */
public class CobolExceptionId {
public final class CobolExceptionId {
/** このクラスはインスタンス化しない。 */
private CobolExceptionId() {}

/** この例外コードは使用されない */
public static final int COB_EC_ZERO = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
package jp.osscons.opensourcecobol.libcobj.exceptions;

/** エラーコードを保持する。 */
public class CobolExceptionInfo {
public final class CobolExceptionInfo {
/** このクラスはインスタンス化しない。 */
private CobolExceptionInfo() {}

/**
* 現在のエラーコード。CobolExceptionTabCode.codeテーブルから取得した16進数のエラーコードが格納される。
* CobolRuntimeExceptionとは異なりコンテキスト情報は保持せず、エラーコードのみを管理する。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
* CobolExceptionIdで定義された例外IDから、COBOL標準の16進数エラーコードへの変換テーブルを保持するクラス。
* codeテーブルのインデックスはCobolExceptionIdの定数値に対応し、値はCOBOL標準で規定された16進数のエラーコードである。
*/
public class CobolExceptionTabCode {
public final class CobolExceptionTabCode {
/** このクラスはインスタンス化しない。 */
private CobolExceptionTabCode() {}

/** CobolExceptionIdの例外IDをインデックスとし、対応する16進数のCOBOLエラーコードを格納する配列 */
static int[] code = {
0, 0xFFFF, 0x0100, 0x0101, 0x0102, 0x0200, 0x0201, 0x0202, 0x0203, 0x0204, 0x0205, 0x0206,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
import jp.osscons.opensourcecobol.libcobj.data.AbstractCobolField;

/** TODO: 準備中 */
public class CobolFileFactory {
public final class CobolFileFactory {

/** このクラスはインスタンス化しない。 */
private CobolFileFactory() {}

/**
* TODO: 準備中
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

/** TODO: 準備中 */
public class CobolFileKey {
/** 新しいインスタンスを生成する。 */
@SuppressWarnings("PMD.UnnecessaryConstructor")
public CobolFileKey() {}

/** TODO: 準備中 */
public static final int COB_MAX_KEY_COMPONENTS = 8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@
import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException;

/** TODO: 準備中 */
public class CobolFileSort {
/** TODO: 準備中 */
protected static final int COBSORTEND = 1;
public final class CobolFileSort {
/** このクラスはインスタンス化しない。 */
private CobolFileSort() {}

/** TODO: 準備中 */
protected static final int COBSORTABORT = 2;
private static final int COBSORTEND = 1;

/** TODO: 準備中 */
protected static final int COBSORTFILEERR = 3;
private static final int COBSORTABORT = 2;

/** TODO: 準備中 */
protected static final int COBSORTNOTOPEN = 4;
private static final int COBSORTFILEERR = 3;

/** TODO: 準備中 */
protected static final int COB_ASCENDING = 0;
private static final int COBSORTNOTOPEN = 4;

/** TODO: 準備中 */
protected static final int COB_DESCENDING = 1;
private static final int COB_ASCENDING = 0;

private static String cob_process_id = "";
private static int cob_iteration = 0;

/** TODO: 準備中 */
protected static int cob_sort_memory = 128 * 1024 * 1024;
private static int cob_sort_memory = 128 * 1024 * 1024;

// Javaの標準ライブラリでソートするならtrue
private static boolean SORT_STD_LIB = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

/** TODO: 準備中 */
public class KeyComponent {
/** 新しいインスタンスを生成する。 */
@SuppressWarnings("PMD.UnnecessaryConstructor")
public KeyComponent() {}

/** TODO: 準備中 */
public AbstractCobolField field;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

/** TODO: 準備中 */
public class Linage {
/** 新しいインスタンスを生成する。 */
@SuppressWarnings("PMD.UnnecessaryConstructor")
public Linage() {}

private AbstractCobolField linage;
private AbstractCobolField linageCtr;
private AbstractCobolField latfoot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
import jp.osscons.opensourcecobol.libcobj.exceptions.CobolExceptionInfo;

/** DISPLAY文やACCEPT文に関するメソッドを実装するクラス */
public class CobolTerminal {
public final class CobolTerminal {

/** このクラスはインスタンス化しない。 */
private CobolTerminal() {}

/** DISPLAY文で設定されたコマンドラインデータのバイト数 */
private static int commlncnt = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* 対応しない型のgetメソッドを呼び出した場合は{@link CobolResultSetException}がスローされる。
*/
public class CobolCallResult {
/** 新しいインスタンスを生成する。 */
@SuppressWarnings("PMD.UnnecessaryConstructor")
public CobolCallResult() {}

/**
* 結果をint型として取得する。
*
Expand Down
Loading