|
Quick Lists
|
|
Bug ID:
|
4111861
|
|
Votes
|
0
|
|
Synopsis
|
static final field contents are not displayed
|
|
Category
|
java:javap
|
|
Reported Against
|
1.2beta2
|
|
Release Fixed
|
7(b34)
|
|
State
|
10-Fix Delivered,
request for enhancement
|
|
Priority:
|
5-Very Low
|
|
Related Bugs
|
4287648
|
|
Submit Date
|
12-FEB-1998
|
|
Description
|
I think javap should display (at least optionally) the
primitive contant values assigned at compilation time to
primitive constant class or interface fields. I think these are part of the
interface and should be displayable. For instance:
public interface PrimitiveConstant {
boolean PRIMITIVE_CONSTANT = true;
}
or
public class PrimitiveConstant {
public static final boolean PRIMITIVE_CONSTANT = true;
}
When I run either of these through javap it will print out
something like:
Compiled from PrimitiveConstant.java
public abstract interface PrimitiveConstant extends java.lang.Object {
public static final boolean SHOW_IT;
}
I want it to instead display:
Compiled from PrimitiveConstant.java
public abstract interface PrimitiveConstant extends java.lang.Object {
public static final boolean SHOW_IT = true;
}
Even if PrimitiveConstant is a class and I run javap with the -c
option to show me the java bytecodes of the methods in the class, it still
refuses to show the compile-time SHOW_IT constant value.
|
|
Work Around
|
N/A
|
|
Evaluation
|
When doclet is rewritten (see 4287648) this should be fixed.
xxxxx@xxxxx 2000-01-18
Because of problems inherent in printing (long) Strings, the feature should only be enabled with an option, such as -constants.
Posted Date : 2008-06-22 16:31:18.0
|
|
Comments
|
Submitted On 29-JUL-2002
MiguelM
I agree, this would be very useful. I often see a numeric value
in a debugger or a database, and I want to coorelate it to a
static constant defined in a class file. It's easy to write a
utility to print these values out, but I have to rewrite it for
each class. This should be incorporated into javap as an
option.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |