public class FieldDescriptor extends IgnorableDescriptor<FieldDescriptor>
PayloadDocumentation.fieldWithPath(String)| Modifier | Constructor and Description |
|---|---|
protected |
FieldDescriptor(java.lang.String path)
Creates a new
FieldDescriptor describing the field with the given
path. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPath()
Returns the path of the field described by this descriptor.
|
java.lang.Object |
getType()
Returns the type of the field described by this descriptor.
|
boolean |
isOptional()
Returns
true if the described field is optional, otherwise false. |
FieldDescriptor |
optional()
Marks the field as optional.
|
FieldDescriptor |
type(java.lang.Object type)
Specifies the type of the field.
|
ignored, isIgnoredattributes, description, getAttributes, getDescriptionprotected FieldDescriptor(java.lang.String path)
FieldDescriptor describing the field with the given
path.path - the pathpublic final FieldDescriptor type(java.lang.Object type)
JsonFieldType enumeration will typically be used.type - The type of the fieldthisJsonFieldTypepublic final FieldDescriptor optional()
thispublic final java.lang.String getPath()
public final java.lang.Object getType()
public final boolean isOptional()
true if the described field is optional, otherwise false.true if the described field is optional, otherwise false