Class TypeProvider.CombinedTypeProvider

  • All Implemented Interfaces:
    TypeProvider
    Enclosing interface:
    TypeProvider

    public static final class TypeProvider.CombinedTypeProvider
    extends java.lang.Object
    implements TypeProvider
    The CombinedTypeProvider takes one or more TypeProvider instances and attempts to look up a Type instance for a given typeName by calling each TypeProvider in the order that they are provided to the constructor.
    • Constructor Detail

      • CombinedTypeProvider

        public CombinedTypeProvider​(java.lang.Iterable<TypeProvider> typeProviders)
    • Method Detail

      • lookupType

        public @Nullable Type lookupType​(java.lang.String typeName)
        Description copied from interface: TypeProvider
        Lookup the a Type given a qualified typeName. Returns null if not found.
        Specified by:
        lookupType in interface TypeProvider
      • lookupEnumValue

        public @Nullable java.lang.Integer lookupEnumValue​(java.lang.String enumName)
        Description copied from interface: TypeProvider
        Lookup the Integer enum value given an enumName. Returns null if not found.
        Specified by:
        lookupEnumValue in interface TypeProvider
      • lookupFieldType

        public @Nullable TypeProvider.FieldType lookupFieldType​(Type type,
                                                                java.lang.String fieldName)
        Description copied from interface: TypeProvider
        Lookup the FieldType for a fieldName within a type. Returns null if not found.

        The FieldType return value will indicate the type of the field and whether presence check is supported via the ('has') macro.

        Specified by:
        lookupFieldType in interface TypeProvider
      • lookupFieldNames

        public @Nullable com.google.common.collect.ImmutableSet<java.lang.String> lookupFieldNames​(Type type)
        Description copied from interface: TypeProvider
        Returns the field names associated with the given Type.

        If the type is not a message type, or the type is not found, the result is null.

        Specified by:
        lookupFieldNames in interface TypeProvider