Class TypeUtil

    • Constructor Detail

      • TypeUtil

        public TypeUtil()
    • Method Detail

      • getCommonBaseType

        public static JType getCommonBaseType​(JCodeModel codeModel,
                                              Collection<? extends JType> types)
        Computes the common base type of two types.
        Parameters:
        types - set of JType objects.
      • getCommonBaseType

        public static JType getCommonBaseType​(JCodeModel 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.