Beaner FAQ

Q: How do I use Beaner with Jakarta Ant?
A: Try something like:
<java
 classname="com.jshift.beaner.Beaner"
 classpath="${libDir}"
 failonerror="true"
>
	<arg value="-d"/>
	<arg value="${structDir}"/>
	<arg value="@beaner_files.txt"/>
</java>
or
<taskdef
 name="beaner"
 classname="com.jshift.beaner.Beaner"
 classpath="${libDir}"
/>

<beaner outputDir="${structDir}">
	<fileset dir="java" includes="**/*.txt"/>
</beaner>
For reasons unknown, these two approaches may not yield exactly the same results for classes extending customized classes. The Classloader appears to function differently in each case. When using the first approach (recommended), a list of text input files should be in beaner_files.txt. This can be done manually or with a simple batch file:
dir .\java\*.txt /S /B > beaner_files.txt
(or an equivalent *nix ls command). To keep everything in ANT, try something like:
<mkdir dir="${buildDir}/client/javaStruct"/>

<concat destfile="${buildDir}/client/beaner_files.bat">
  dir ${srcDir}\client\java\*.txt /S /B > ${buildDir}\client\beaner_files.txt
</concat>
<replaceregexp
 file="${buildDir}/client/beaner_files.bat"
 match="(\S)/(\S)"
 replace="\1\\\\\2"
 flags="g"
/>

Q: Will this utility work with Unicode characters?
A: Maybe.

Q: How can I force an abstract accessor but no mutator?
A: Declare a variable as both 'abstract' and 'final'.