org.jvnet.hyperjaxb3.xjc.reader
Class TypeUtil
java.lang.Object
org.jvnet.hyperjaxb3.xjc.reader.TypeUtil
public class TypeUtil
- extends Object
Type-related utility methods.
- Author:
- Kohsuke KAWAGUCHI
|
Method Summary |
static com.sun.codemodel.JType |
getCommonBaseType(com.sun.codemodel.JCodeModel codeModel,
Collection<? extends com.sun.codemodel.JType> types)
Computes the common base type of two types. |
static com.sun.codemodel.JType |
getCommonBaseType(com.sun.codemodel.JCodeModel codeModel,
com.sun.codemodel.JType... t)
Computes the common base type of types. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeUtil
public TypeUtil()
getCommonBaseType
public static com.sun.codemodel.JType getCommonBaseType(com.sun.codemodel.JCodeModel codeModel,
Collection<? extends com.sun.codemodel.JType> types)
- Computes the common base type of two types.
- Parameters:
types - set of JType objects.
getCommonBaseType
public static com.sun.codemodel.JType getCommonBaseType(com.sun.codemodel.JCodeModel codeModel,
com.sun.codemodel.JType... t)
- 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.
Copyright © 2005-2014. All Rights Reserved.