Package kilim.analysis
Class TypeDesc
java.lang.Object
kilim.analysis.TypeDesc
A utility class that provides static methods for interning type strings and merging type
descriptors.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcommonSuperType(Detector det, String oa, String ob) static String[]getArgumentTypes(String methodDescriptor) static Stringstatic StringgetInternalName(String desc) static StringgetInterned(String desc) static intgetNumArgumentTypes(char[] buf) static intgetNumArgumentTypes(String desc) static StringgetReturnTypeDesc(String desc) static StringgetTypeDesc(Object object) (package private) static booleanisDoubleWord(String desc) static booleanstatic boolean(package private) static booleanisSingleWord(String desc) static StringGiven two type descriptors, it returns an appropriate merge: 1) If they are Array types, the result is a an array of the merged component types 2) If they are ref types, it returns the least common super type.private static inttypelen(char[] buf, int off)
-
Field Details
-
knownTypes
-
JAVA_LANG_OBJECT
-
-
Constructor Details
-
TypeDesc
public TypeDesc()
-
-
Method Details
-
isDoubleWord
-
getInterned
-
getReturnTypeDesc
-
isSingleWord
-
getComponentType
-
getTypeDesc
-
typelen
private static int typelen(char[] buf, int off) -
getArgumentTypes
-
getNumArgumentTypes
-
getNumArgumentTypes
public static int getNumArgumentTypes(char[] buf) -
mergeType
Given two type descriptors, it returns an appropriate merge: 1) If they are Array types, the result is a an array of the merged component types 2) If they are ref types, it returns the least common super type. If one of them is an interface, the result is D_OBJECT 3) All other types must match exactly in order to not raise an error.- Throws:
IncompatibleTypesException
-
commonSuperType
-
isIntType
-
isRefType
-
getInternalName
-