Class TypeProtoUtils


  • public class TypeProtoUtils
    extends java.lang.Object
    • Constructor Detail

      • TypeProtoUtils

        public TypeProtoUtils()
    • Method Detail

      • getSuperclassChain

        @Nonnull
        public static java.lang.Iterable<TypeProto> getSuperclassChain​(@Nonnull
                                                                       TypeProto typeProto)
        Get the chain of superclasses of the given class. The first element will be the immediate superclass followed by it's superclass, etc. up to java.lang.Object. Returns an empty iterable if called on java.lang.Object or a primitive. If any class in the superclass chain can't be resolved, the iterable will return Ujava/lang/Object; to represent the unknown class.
        Returns:
        An iterable containing the superclasses of this class.
      • getSuperclassAsTypeProto

        @Nullable
        public static TypeProto getSuperclassAsTypeProto​(@Nonnull
                                                         TypeProto type)
      • extendsFrom

        public static boolean extendsFrom​(@Nonnull
                                          TypeProto candidate,
                                          @Nonnull
                                          java.lang.String possibleSuper)