svnno****@sourc*****
svnno****@sourc*****
2009年 4月 10日 (金) 21:17:31 JST
Revision: 3210 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3210 Author: j5ik2o Date: 2009-04-10 21:17:31 +0900 (Fri, 10 Apr 2009) Log Message: ----------- 不要なクラスを削除 Removed Paths: ------------- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDoclet.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDocletContext.java -------------- next part -------------- Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDoclet.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDoclet.java 2009-04-10 12:16:17 UTC (rev 3209) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDoclet.java 2009-04-10 12:17:31 UTC (rev 3210) @@ -1,121 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 5, 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.composer.importer.meta.impl; - - -/** - * エンティティとプロパティのコメントを抽出するDoclet。 - * - * @author j5ik2o - */ - @ SuppressWarnings("restriction") -public class CommentDoclet /*extends Doclet*/{ - - /** - * エンティティクラスのコメントを処理する。 - * - * @param classDoc {@link ClassDoc} - * @param entityMeta エンティティメタデータ - */ - /* - protected static void doEntityComment(ClassDoc classDoc, EntityMeta entityMeta) { - EntityMetaUtil.setComment(entityMeta, classDoc.commentText()); - Map<String, FieldDoc> fieldDocMap = getFieldDocMap(classDoc); - for (PropertyMeta propertyMeta : entityMeta.getAllPropertyMeta()) { - if (fieldDocMap.containsKey(propertyMeta.getName())) { - FieldDoc fieldDoc = fieldDocMap.get(propertyMeta.getName()); - doPropertyComment(fieldDoc, propertyMeta); - } - } - } - */ - /** - * プロパティのコメントを処理する。 - * - * @param fieldDoc {@link FieldDoc} - * @param propertyMeta プロパティメタデータ - */ - /* - protected static void doPropertyComment(FieldDoc fieldDoc, PropertyMeta propertyMeta) { - PropertyMetaUtil.setComment(propertyMeta, fieldDoc.commentText()); - } - */ - /** - * フィールド名をキー、 {@link FieldDoc}を値とするマップを取得する。 - * - * @param classDoc {@link ClassDoc} - * @return フィールド名をキー、 {@link FieldDoc}を値とするマップ - */ - /* - protected static Map<String, FieldDoc> getFieldDocMap(ClassDoc classDoc) { - Map<String, FieldDoc> fieldMap = new HashMap<String, FieldDoc>(); - for (FieldDoc fieldDoc : classDoc.fields(false)) { - fieldMap.put(fieldDoc.name(), fieldDoc); - } - for (ClassDoc superclassDoc = classDoc.superclass(); !Object.class.getName().equals( - superclassDoc.qualifiedName()); superclassDoc = superclassDoc.superclass()) { - if (isMappedSuperclass(superclassDoc)) { - for (FieldDoc fieldDoc : superclassDoc.fields()) { - if (!fieldMap.containsKey(fieldDoc.name())) { - fieldMap.put(fieldDoc.name(), fieldDoc); - } - } - } - } - return fieldMap; - } - */ - /** - * {@link MappedSuperclass}を表す場合{@code true}を取得する。 - * - * @param classDoc {@link ClassDoc} - * @return {@link MappedSuperclass}を表す場合{@code true} - */ - /* - protected static boolean isMappedSuperclass(ClassDoc classDoc) { - for (AnnotationDesc desc : classDoc.annotations()) { - if (MappedSuperclass.class.getName().equals(desc.annotationType().qualifiedName())) { - return true; - } - } - return false; - } - */ - /* - public static LanguageVersion languageVersion() { - return LanguageVersion.JAVA_1_5; - } - */ - /* - public static boolean start(RootDoc rootDoc) { - List<EntityMeta> entityMetaList = CommentDocletContext.getEntityMetaList(); - if (entityMetaList == null) { - throw new NullPointerException("entityMetaList"); - } - for (EntityMeta entityMeta : entityMetaList) { - ClassDoc classDoc = rootDoc.classNamed(entityMeta.getEntityClass().getName()); - if (classDoc == null) { - continue; - } - doEntityComment(classDoc, entityMeta); - } - return true; - } - */ -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDocletContext.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDocletContext.java 2009-04-10 12:16:17 UTC (rev 3209) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/CommentDocletContext.java 2009-04-10 12:17:31 UTC (rev 3210) @@ -1,59 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 5, 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.composer.importer.meta.impl; - -import java.util.List; - -import org.jiemamy.composer.importer.meta.EntityMeta; -import org.jiemamy.exception.JiemamyError; - -/** - * {@link CommentDoclet}のためのコンテキスト情報。 - * - * @author j5ik2o - */ -public class CommentDocletContext { - - /** エンティティメタリーダのリストを格納する{@link ThreadLocal} */ - protected static ThreadLocal<List<EntityMeta>> threadLocal = new ThreadLocal<List<EntityMeta>>(); - - - /** - * エンティティメタデータのリストを取得する。 - * - * @return エンティティメタデータのリストを設定する。 - */ - public static List<EntityMeta> getEntityMetaList() { - return threadLocal.get(); - } - - /** - * エンティティメタデータのリストを設定する。 - * - * @param entityMetaList エンティティメタデータのリスト - */ - public static void setEntityMetaList(List<EntityMeta> entityMetaList) { - threadLocal.set(entityMetaList); - } - - private CommentDocletContext() { - throw new JiemamyError("不到達ポイント"); - } - -}