Menu

#2 Character encoding, parameterized types and context 2.

open
nobody
None
5
2009-07-07
2009-07-07
Anonymous
No

Patches to VelocityDoclet.

(Sorry for the previous patch, I attach the all files now as a zip archive.)

With this patch you could set the encoding of the source files, Velocity
templates and the output files like this:

<velocityDoclet encoding="utf-8" inputEncoding="utf-8"
outputEncoding="utf-8" ...

With the modification of AbstractDoclet doclets will support the new
language features of the Java 1.5, for example generics (parameterized
types).

If you specify a comma separeted fully qualified name of classes, the
VelocityDoclet will instantiate them with their construtors without
parameters, and puts the instances to the Velocity context (the name of the
variable equals the simple name of the class), For example:

<velocityDoclet classes="org.foo.MyClass" ...

The VelocityDoclet will instantiate the org.foo.MyClass class and put into
the Velocity context.

New methods in TemplateTools:

getParameterCommentByName: Returns the comment for the parameter given by
it's name.
getGetterName: Gets the name of the field, removing the "get" or "is" (by
boolean) prefix from the method's name, and setting fist character to be
lower case.
parameterizedTypeName: Returns the parameterized type name of a type.

Istvan Viczian
viczian.istvan at gmail.com

Discussion

  • Nobody/Anonymous

    All modified files to this patch

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.