I apologize, I should have supplied more context....
Here is my sample source
package ...;
import java.math.BigInteger;
public class TestJavaDoc
{
/**
* TEST_STRING has value {@value}
*/
public static final String TEST_STRING = "IFQ Permit ";
/**
* TEST_BIG_INTEGER has value {@value}
* Should also work like this {@value #TEST_BIG_INTEGER}
* Constant ONE has a value {@value BigInteger#ONE}
*/
public static final BigInteger TEST_BIG_INTEGER = BigInteger.valueOf(1000);
}
Here is the generated Javadoc, where you can see that @value works for a String, but fails for BigInteger....
TEST_STRING
public static final java.lang.String TEST_STRING
TEST_STRING has value "IFQ Permit "
TEST_BIG_INTEGER
public static final java.math.BigInteger TEST_BIG_INTEGER
TEST_BIG_INTEGER has value {@value}
Should also work like this {@value}
Constant ONE has a value {@value}
Here is more context:
>javadoc -J-version
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)
excerpt from build.xml:
<target name="larryDoc"
description="Generates JavaDoc Business Rule classes">
<tstamp>
<format property="generation.time" pattern="MM/dd/yyyy hh:mm:ss aa"/>
</tstamp>
<javadoc
destdir="./businessRules"
author = "true"
version = "true"
use = "true"
windowtitle = "Business Rules"
additionalparam="-breakiterator">
<fileset dir="../business/src" defaultexcludes="yes">
<include name="org/psmfc/er/business/TestJavaDoc.java"/>
</fileset>
<classpath>
<path>
<pathelement path="IER/business/classes"/>
</path>
</classpath>
<bottom>generated: ${generation.time}</bottom>
</javadoc>
</target>
Thanks for the detail (I should have understood that's what you meant).
Sorry, but I believe {@value} was designed to work only with RH constants, not RH expressions or variables. I believe if you were to try assigning an expression to a static string, it would also fail. This was a design decision.
-Doug
Thanks for the info. I presume that design decision was for expediency, I can imagine that it is several orders of magnitude simpler to render the value of an RH constant than it is to interpret and render the value of an expression....
I need to be reminded that Javadoc is a text processing tool and not an integral part of the Java compiler.
It would be very nice if it could render the value of any constants.