|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.util.Constants
public class Constants
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.
| Constructor Summary | |
|---|---|
Constants()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
decode(java.lang.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. |
static java.lang.String |
format(java.lang.Object value)
Returns a string representation of a constant value (given in standard wrapped representation), quoted and formatted as in Java source. |
static java.lang.String |
format(java.lang.Object value,
Type type)
Returns a string representation of a constant value (given in internal representation), quoted and formatted as in Java source. |
private static java.lang.String |
formatByte(byte b)
|
private static java.lang.String |
formatChar(char c)
|
private static java.lang.String |
formatDouble(double d)
|
private static java.lang.String |
formatFloat(float f)
|
private static java.lang.String |
formatLong(long lng)
|
private static java.lang.String |
formatString(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Constants()
| Method Detail |
|---|
public static java.lang.Object decode(java.lang.Object value,
Type type)
public static java.lang.String format(java.lang.Object value,
Type type)
public static java.lang.String format(java.lang.Object value)
private static java.lang.String formatByte(byte b)
private static java.lang.String formatLong(long lng)
private static java.lang.String formatFloat(float f)
private static java.lang.String formatDouble(double d)
private static java.lang.String formatChar(char c)
private static java.lang.String formatString(java.lang.String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||