svnno****@sourc*****
svnno****@sourc*****
2009年 4月 13日 (月) 18:46:41 JST
Revision: 3248 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3248 Author: j5ik2o Date: 2009-04-13 18:46:41 +0900 (Mon, 13 Apr 2009) Log Message: ----------- クラスを追加しました。 Added Paths: ----------- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/Generator.java leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/GeneratorContext.java -------------- next part -------------- Added: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/Generator.java =================================================================== --- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/Generator.java (rev 0) +++ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/Generator.java 2009-04-13 09:46:41 UTC (rev 3248) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 13, 2009 + * + * This file is part of Jiemamy. + * + * 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 org.jiemamy.entity.io.generator; + +import java.io.IOException; + +import org.jiemamy.entity.io.generator.impl.GenerateException; + +/** + * ファイルを生成するインタフェース。 + * + * @author j5ik2o + */ +public interface Generator { + + /** + * ファイルを生成する。 + * + * @param context コンテキスト + * @throws IOException 入出力が失敗した場合 + */ + void generate(GeneratorContext context) throws GenerateException; + +} Property changes on: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/Generator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/GeneratorContext.java =================================================================== --- leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/GeneratorContext.java (rev 0) +++ leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/GeneratorContext.java 2009-04-13 09:46:41 UTC (rev 3248) @@ -0,0 +1,64 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 13, 2009 + * + * This file is part of Jiemamy. + * + * 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 org.jiemamy.entity.io.generator; + +import java.io.File; + +/** + * {@link Generator}のためのコンテキストインターフェイス。 + * + * @author j5ik2o + */ +public interface GeneratorContext { + + /** + * エンコーディングを取得する。 + * + * @return エンコーディング + */ + String getEncoding(); + + /** + * 生成するファイルを取得する。 + * + * @return 生成するファイル + */ + File getFile(); + + /** + * データモデルを取得する。 + * + * @return データモデル + */ + Object getModel(); + + /** + * テンプレート名を取得する。 + * + * @return テンプレート名 + */ + String getTemplateName(); + + /** + * 上書きフラグを取得する。 + * + * @return 上書きする場合は{@code true}、しない場合は{@code false} + */ + boolean isOverwrite(); +} Property changes on: leto/jiemamy-entity-io/trunk/src/main/java/org/jiemamy/entity/io/generator/GeneratorContext.java ___________________________________________________________________ Added: svn:mime-type + text/plain