@Immutable public class GQLField extends Object implements GQLSelection
| Constructor and Description |
|---|
GQLField(net.morimekta.providence.descriptor.PField field)
Make a simple field selection based on a message field.
|
GQLField(net.morimekta.providence.descriptor.PField field,
List<GQLSelection> selectionSet)
Make a simple field selection based on a message field.
|
GQLField(net.morimekta.providence.descriptor.PField field,
String alias,
net.morimekta.providence.PMessage<?> arguments,
List<GQLSelection> selectionSet)
Make a full field selection definition.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAlias() |
<M extends net.morimekta.providence.PMessage<M>> |
getArguments() |
net.morimekta.providence.descriptor.PField |
getField() |
List<GQLSelection> |
getSelectionSet() |
int |
hashCode() |
boolean |
representing(net.morimekta.providence.descriptor.PField inf)
Check if the input field is represented with this field selection.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSelection, hasSelection, hasSelectionPathpublic GQLField(@Nonnull net.morimekta.providence.descriptor.PField field)
field - The field to be represented.public GQLField(@Nonnull net.morimekta.providence.descriptor.PField field, @Nullable List<GQLSelection> selectionSet)
field - The field to be represented.selectionSet - SelectionSet for sub-field selection.public GQLField(@Nonnull net.morimekta.providence.descriptor.PField field, @Nullable String alias, @Nullable net.morimekta.providence.PMessage<?> arguments, @Nullable List<GQLSelection> selectionSet)
field - The field to be represented.alias - The alias to be used in the JSON output.arguments - Arguments used for field mutators.selectionSet - SelectionSet for sub-field selection.public boolean representing(net.morimekta.providence.descriptor.PField inf)
E.g. if 'A' is an interface field, and 'B' and 'C' are the equivalent field in two different messages, and this selection is for 'B', then it is representing 'A', and 'B', but not 'C'. But if this is a selection for 'A', then all three will match.
inf - The field to check.@Nonnull public net.morimekta.providence.descriptor.PField getField()
@Nullable public <M extends net.morimekta.providence.PMessage<M>> M getArguments()
M - The argument message type.@Nullable public List<GQLSelection> getSelectionSet()
getSelectionSet in interface GQLSelectionCopyright © 2015–2020 morimekta.net. All rights reserved.