Doge log

Abby CTO 雑賀 力王のオフィシャルサイトです

hotdeployことはじめ

hot使いつつweb(subApplicationパッケージ)以下の階層を2階層とかにしたいって要望があったりなかったりすんのかなと。
(なんかうちは階層分けたいとかって言う人が多い)
NamingConventionImplをほげればできるんじゃねーかなあと思ってほげる。
パッケージ名、クラス名に"_"が入らなければこれでもいいと思ったりする。

CustomNamingConventionImpl

    public String fromComponentNameToPartOfClassName(String componentName) {
        if (componentName == null) {
            throw new EmptyRuntimeException("componentName");
        }
        int index = componentName.indexOf(PACKAGE_SEPARATOR);
        if (index < 0) {
            return StringUtil.capitalize(componentName);
        }
        int sepIndex = componentName.lastIndexOf("_");
        return componentName.substring(0, sepIndex).replace('_', '.')+"."
                + StringUtil.capitalize(componentName.substring(sepIndex + 1));
    }

とまあこんな感じ。
多分みんな知ってると思うけど書いてみた。お役に立てれば。
最近"ほげる"って

ソース読んでいじくる。またはハックする。

って意味で使われてるものだと思ってるけどちゃうんかなあ?
うくく。