|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectProglangType
public final class ProglangType
Represents the type of a variable, for its declared, dtrace file representation, and internal representations. ProgLangTypes are interned, so they can be == compared.
| Field Summary | |
|---|---|
static ProglangType |
BOOLEAN
|
static ProglangType |
BOOLEAN_ARRAY
|
static ProglangType |
CHAR
|
static ProglangType |
CHAR_ARRAY
|
static ProglangType |
CHAR_ARRAY_ARRAY
|
static boolean |
dkconfig_convert_to_signed
If true, treat 32 bit values whose high bit is on, as a negative number (rather than as a 32 bit unsigned). |
static ProglangType |
DOUBLE
|
static ProglangType |
DOUBLE_ARRAY
|
static ProglangType |
HASHCODE
|
static ProglangType |
HASHCODE_ARRAY
|
static ProglangType |
INT
|
static ProglangType |
INT_ARRAY
|
static ProglangType |
INTEGER
|
static HashSet<String> |
list_implementors
|
static ProglangType |
LONG_OBJECT
|
static ProglangType |
LONG_PRIMITIVE
|
static ProglangType |
LONG_PRIMITIVE_ARRAY
|
static ProglangType |
OBJECT
|
static ProglangType |
STRING
|
static ProglangType |
STRING_ARRAY
|
| Method Summary | |
|---|---|
String |
base()
|
boolean |
baseIsBoolean()
|
boolean |
baseIsFloat()
|
boolean |
baseIsHashcode()
|
boolean |
baseIsIntegral()
|
boolean |
baseIsObject()
|
boolean |
baseIsPrimitive()
|
boolean |
baseIsScalar()
|
boolean |
baseIsString()
|
boolean |
comparableOrSuperclassEitherWay(ProglangType other)
Return true if these two types can be sensibly compared to one another, or if one can be cast to the other. |
boolean |
comparableOrSuperclassOf(ProglangType other)
Return true if these two types can be sensibly compared to one another, and if non-integral, whether this could be a superclass of other. |
int |
dimensions()
|
boolean |
elementIsFloat()
|
boolean |
elementIsIntegral()
|
boolean |
elementIsString()
|
ProglangType |
elementType()
Returns the type of elements of this. |
ProglangType |
fileTypeToRepType()
Convert a file representation type to an internal representation type. |
String |
format()
|
boolean |
is_function_pointer()
Returns whether or not this declared type is a function pointer Only valid if the front end marks the function pointer with the name '*func' |
boolean |
isArray()
|
boolean |
isFloat()
|
boolean |
isHashcode()
|
boolean |
isIndex()
|
boolean |
isIntegral()
|
boolean |
isObject()
|
boolean |
isPointerFileRep()
Does this type represent a pointer? |
boolean |
isPrimitive()
|
boolean |
isScalar()
|
boolean |
isString()
|
Object |
parse_value_array_1d(String value)
|
Object |
parse_value_array_2d(String value)
|
Object |
parse_value_scalar(String value)
|
Object |
parse_value(String value)
Given a string representation of a value (of the type represented by this ProglangType), return the (canonicalized) interpretation of that value. |
static ProglangType |
parse(String rep)
This can't be a constructor because it returns a canonical representation (that can be compared with ==), not necessarily a new object. |
Object |
readResolve()
For serialization; indicates which object to return instead of the one that was just read from the file. |
static ProglangType |
rep_parse(String rep)
Like parse, but does certain conversions for representation types, in order to return real file representation types even if the file contains something slightly different than the prescribed format. |
String |
toString()
|
static String |
toString(ProglangType[] types)
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static HashSet<String> list_implementors
public static boolean dkconfig_convert_to_signed
public static final ProglangType INT
public static final ProglangType LONG_PRIMITIVE
public static final ProglangType DOUBLE
public static final ProglangType CHAR
public static final ProglangType STRING
public static final ProglangType INT_ARRAY
public static final ProglangType LONG_PRIMITIVE_ARRAY
public static final ProglangType DOUBLE_ARRAY
public static final ProglangType CHAR_ARRAY
public static final ProglangType STRING_ARRAY
public static final ProglangType CHAR_ARRAY_ARRAY
public static final ProglangType INTEGER
public static final ProglangType LONG_OBJECT
public static final ProglangType OBJECT
public static final ProglangType BOOLEAN
public static final ProglangType HASHCODE
public static final ProglangType BOOLEAN_ARRAY
public static final ProglangType HASHCODE_ARRAY
| Method Detail |
|---|
public String base()
public int dimensions()
public boolean isArray()
public static ProglangType parse(String rep)
rep - the name of the type, optionally suffixed by
(possibly multiple) "[]"public static ProglangType rep_parse(String rep)
public ProglangType fileTypeToRepType()
public Object readResolve()
throws ObjectStreamException
ObjectStreamExceptionpublic ProglangType elementType()
public final Object parse_value(String value)
If the type is an array and there are any nonsensical elements in the array, the entire array is considered to be nonsensical (indicated by returning null). This is not really correct, but it is a reasonable path to take for now. (jhp, Feb 12, 2005)
public final Object parse_value_scalar(String value)
public final Object parse_value_array_1d(String value)
public final Object parse_value_array_2d(String value)
public boolean baseIsPrimitive()
public boolean isPrimitive()
public boolean baseIsIntegral()
public boolean isIntegral()
public boolean elementIsIntegral()
public boolean elementIsFloat()
public boolean elementIsString()
public boolean isIndex()
public boolean isScalar()
public boolean baseIsScalar()
public boolean baseIsBoolean()
public boolean baseIsFloat()
public boolean isFloat()
public boolean isObject()
public boolean baseIsObject()
public boolean baseIsString()
public boolean isString()
public boolean baseIsHashcode()
public boolean isHashcode()
public boolean isPointerFileRep()
public boolean comparableOrSuperclassEitherWay(ProglangType other)
public boolean comparableOrSuperclassOf(ProglangType other)
public String format()
public static String toString(ProglangType[] types)
public String toString()
toString in class Objectpublic boolean is_function_pointer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||