Class GQLFragmentDefinition
- java.lang.Object
-
- net.morimekta.providence.graphql.gql.GQLFragmentDefinition
-
- All Implemented Interfaces:
GQLFragment,GQLSelection
@Immutable public class GQLFragmentDefinition extends java.lang.Object implements GQLFragment
A fragment definition, as part of the query.
-
-
Constructor Summary
Constructors Constructor Description GQLFragmentDefinition(java.lang.String name, net.morimekta.providence.descriptor.PMessageDescriptor<?> descriptor, java.util.List<GQLSelection> selectionSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<GQLSelection>getSelectionSet()net.morimekta.providence.descriptor.PMessageDescriptor<?>getTypeCondition()All fragments represent a specific message type of a union field, or an interface implementation.inthashCode()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.graphql.gql.GQLFragment
isApplicableFor
-
Methods inherited from interface net.morimekta.providence.graphql.gql.GQLSelection
getSelection, hasSelection
-
-
-
-
Constructor Detail
-
GQLFragmentDefinition
public GQLFragmentDefinition(@Nonnull java.lang.String name, @Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<?> descriptor, @Nonnull java.util.List<GQLSelection> selectionSet)- Parameters:
name- Name of the fragment.descriptor- Descriptor of type defined in this fragment.selectionSet- SelectionSet for the fragment.
-
-
Method Detail
-
getTypeCondition
@Nonnull public net.morimekta.providence.descriptor.PMessageDescriptor<?> getTypeCondition()
Description copied from interface:GQLFragmentAll fragments represent a specific message type of a union field, or an interface implementation. This should return the descriptor of that message type.- Specified by:
getTypeConditionin interfaceGQLFragment- Returns:
- The fragment type descriptor.
-
getSelectionSet
@Nonnull public java.util.List<GQLSelection> getSelectionSet()
- Specified by:
getSelectionSetin interfaceGQLFragment- Specified by:
getSelectionSetin interfaceGQLSelection- Returns:
- List if selections contained within this selection.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-