Valid

public final class Valid extends FieldValidatingOption<T>

An option that indicates that the message field should be validated according to its constraints.

Constructors

Link copied to clipboard
public void Valid()
Creates a new instance of this option.

Functions

Link copied to clipboard
public Constraint constraintFor(FieldContext field)
Creates a Constraint for the given field based on the value of the option.
Link copied to clipboard
public boolean shouldValidate(FieldContext context)
Returns true if this option exists for the specified field, false otherwise.

Inherited functions

Link copied to clipboard
public boolean equals(Object o)
Link copied to clipboard
public GeneratedMessage.GeneratedExtension<E, T> extension()
Link copied to clipboard
public int hashCode()
Link copied to clipboard
protected abstract E optionsFrom(K p)
protected DescriptorProtos.FieldOptions optionsFrom(Descriptors.FieldDescriptor object)
Link copied to clipboard
protected T optionValue(FieldContext field)
Returns a value of the option.
Link copied to clipboard
public Optional<T> valueFrom(K object)

public Optional<T> valueFrom(FieldContext context)
Takes the value of the option from the given descriptor, given the specified context.
Link copied to clipboard
public boolean valuePresent(K object)