Interface PField<M extends PMessage<M>>

    • Method Detail

      • getId

        int getId()
        Returns:
        The field numeric ID or key.
      • getRequirement

        @Nonnull
        PRequirement getRequirement()
        Returns:
        How the field is required for validity.
      • getType

        @Nonnull
        default PType getType()
        Returns:
        The data type of the field.
      • getDescriptor

        @Nonnull
        PDescriptor getDescriptor()
        Returns:
        The type descriptor for the field data type.
      • getArgumentsType

        @Nullable
        PStructDescriptor getArgumentsType()
        If present, is the params type to be used for parameterizable field content, e.g. with GraphQL.
        Returns:
        The params type, or null if not parameterizable.
      • getName

        @Nonnull
        java.lang.String getName()
        Returns:
        The field name (original).
      • getPojoName

        @Nonnull
        java.lang.String getPojoName()
        Returns:
        The field's pojo name.
      • hasDefaultValue

        boolean hasDefaultValue()
        Returns:
        Whether the field has an explicit default value.
      • getDefaultValue

        java.lang.Object getDefaultValue()
        Returns:
        The default value or null if none. This should return value also where the field has an implicit default value, e.g. numerical types.
      • onMessageType

        @Nonnull
        PMessageDescriptor<M> onMessageType()
        The message type the field is on.
        Returns:
        The fields message type.
      • asString

        @Nonnull
        static java.lang.String asString​(PField field)
        asString helper for fields.
        Parameters:
        field - The field to make string of.
        Returns:
        The field asString.
      • asIfString

        @Nonnull
        static java.lang.String asIfString​(PField field)
        asIfString helper for interface fields.
        Parameters:
        field - The field to make string of.
        Returns:
        The field asString.