| java.lang.Object com.sun.tools.javac.util.Constants
Constants | public class Constants (Code) | | Utilities for operating on constant values.
This is NOT part of any API supported by Sun Microsystems. If
you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Method Summary | |
public static Object | decode(Object value, Type type) Converts a constant in internal representation (in which
boolean, char, byte, short, and int are each represented by an
Integer) into standard representation. | public static String | format(Object value, Type type) Returns a string representation of a constant value (given in
internal representation), quoted and formatted as in Java source. | public static String | format(Object value) Returns a string representation of a constant value (given in
standard wrapped representation), quoted and formatted as in
Java source. |
decode | public static Object decode(Object value, Type type)(Code) | | Converts a constant in internal representation (in which
boolean, char, byte, short, and int are each represented by an
Integer) into standard representation. Other values (including
null) are returned unchanged.
|
format | public static String format(Object value, Type type)(Code) | | Returns a string representation of a constant value (given in
internal representation), quoted and formatted as in Java source.
|
format | public static String format(Object value)(Code) | | Returns a string representation of a constant value (given in
standard wrapped representation), quoted and formatted as in
Java source.
|
|
|