Package com.sun.tools.xjc.reader
Class TypeUtil
java.lang.Object
com.sun.tools.xjc.reader.TypeUtil
Type-related utility methods.
- Author:
- Kohsuke KAWAGUCHI
-
Method Summary
Modifier and TypeMethodDescriptionstatic JType
getCommonBaseType
(JCodeModel codeModel, JType... t) Computes the common base type of types.static JType
getCommonBaseType
(JCodeModel codeModel, Collection<? extends JType> types) Computes the common base type of two types.static JType
getType
(JCodeModel codeModel, String typeName, ErrorReceiver errorHandler, Locator errorSource) Obtains aJType
object for the string representation of a type.
-
Method Details
-
getCommonBaseType
Computes the common base type of two types.- Parameters:
types
- set ofJType
objects.
-
getCommonBaseType
Computes the common base type of types. TODO: this is a very interesting problem. Since one type has possibly multiple base types, it's not an easy problem. The current implementation is very naive. To make the result deterministic across differente JVMs, we have to use a Set whose ordering is deterministic. -
getType
public static JType getType(JCodeModel codeModel, String typeName, ErrorReceiver errorHandler, Locator errorSource) Obtains aJType
object for the string representation of a type.
-