java
<xmlproperty file="hage.properties.xml" semanticattributes="true" keeproot="false" /> <hoge> <emptystring></emptystring> </hoge> とかやってもhoge.emptystringプロパティは定義されない。パースのやりかたを考えるとまあ妥当な仕様ではある。 属性使ってもプロパティが定義できるので、空文字列を入れたいときは <hoge emptystring=""> </hoge> …</xmlproperty>
デバッガ使えや……とおっしゃるかもしれませんがantタスクをアタッチする方法がよくわからなかったので。 JVMのオプションに -agentlib:hprof=cpu=samplesを指定。この指定方法は1.5以前だと違うとか何とかだけどまあそれはいい。 hprofというのは標準でつい…
Parameters: in - the input stream from which to read the XML document. Throws: IOException - if reading from the specified input stream results in an IOException. InvalidPropertiesFormatException - Data on input stream does not constitute …
リフレクション+アノテーションでとても簡単。Commons CLIより高機能だな。 command output.txt -format TXT -limit 100 -flagenum OutputFormat { TXT, TSV }; public static class Conf { @Option(name="-flag",usage="this is the flag") public boolean …
本家:Commons CLI – Home javadoc(1.x):http://commons.apache.org/cli/api-release/ コマンドラインオプション解析ライブラリの定番ってなんだろう。Commonsブランドを選んでみたが開発状況が微妙。 1.1をつかってみた。 command --limitsize 1000 -n "hoge…
あらすじ:mysqlの文字列比較がウムラウトだのアキュートアクセントだのあのへんをいっさい無視するがjavaのデフォ文字列比較では区別して扱うためjava的にはユニークな文字列のコレクションを挿入せんとしているところがMySQL的には全然ユニークじゃないため…